Author |
Topic |
|
amitch
Starting Member
2 Posts |
Posted - 24 January 2006 : 14:18:32
|
We have a mailing list and we want to import the users from that to the forum. I have imported the users and have given the username as the email address itself and password as email address before @. I want the password to be the same as the username(which is the email address before @). Now the problem is how to encode that password. I see that the register page call inc_SHA256 to do this. how can i do it in access database without using this page. THanks < |
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 24 January 2006 : 14:25:39
|
How much do you know about writing ASP code ?
You have to loop around the records in the table, and SHA256 each as you go.
If you don't know ASP, it might be simpler to hit the "forgot password" link for every member and they can fix it themselves - depends on the quantity of members you have.< |
|
|
amitch
Starting Member
2 Posts |
Posted - 24 January 2006 : 14:36:05
|
I know asp well but then i would have to run the asp page for as many number of times as the number of users.< |
|
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 24 January 2006 : 15:07:27
|
quote: run the asp page for as many number of times as the number of users.
No, just once to loop around all database records.< |
|
|
emperezg
Starting Member
Bhutan
1 Posts |
Posted - 03 May 2007 : 14:01:34
|
This can help to import users from a db table to the Members table with SHA256 function.
******************************************************** <!--#INCLUDE FILE="config.asp"--> <!--#INCLUDE FILE="inc_sha256.asp"--> <!--#INCLUDE FILE="inc_header.asp" -->
<% dim iCount, sCounting, txtPassword
strSql = "SELECT * FROM members"
Set rsGetForumName=Server.CreateObject("ADODB.Recordset") Set rsInsertRow=Server.CreateObject("ADODB.Recordset")
'Open the recordset object executing the SQL rsGetForumName.Open strSql,my_Conn,3,3 'set our variable count equal to the number of records
Dim myarray(45)
sCounting = rsGetForumName.recordcount
'Response.Write sCounting
For iCount = 0 to (sCounting - 1)
For i = 0 to 45 If rsGetForumName(i).Name = "M_PASSWORD" Then 'Response.Write SHA256(rsGetForumName(i)) & "<br/>" myarray(i) = SHA256(rsGetForumName(i)) Else 'response.write rsGetForumName(i) & "<br/>" 'INSERT A ROW myarray(i) = rsGetForumName(i) End If
next
sSQL = "INSERT INTO FORUM_MEMBERS " sSQL = sSQL & "(M_STATUS,M_NAME,M_USERNAME,M_PASSWORD,M_EMAIL,M_COUNTRY,M_HOMEPAGE,M_SIG,M_VIEW_SIG,M_SIG_DEFAULT,M_DEFAULT_VIEW,M_LEVEL,M_AIM,M_ICQ,M_MSN,M_YAHOO,M_POSTS,M_DATE,M_LASTHEREDATE,M_LASTPOSTDATE,M_TITLE,M_SUBSCRIPTION,M_HIDE_EMAIL,M_RECEIVE_EMAIL,M_LAST_IP,M_IP,M_FIRSTNAME,M_LASTNAME,M_OCCUPATION,M_SEX,M_AGE,M_DOB,M_HOBBIES,M_LNEWS,M_QUOTE,M_BIO,M_MARSTATUS,M_LINK1,M_LINK2,M_CITY,M_STATE,M_PHOTO_URL,M_KEY,M_NEWEMAIL,M_PWKEY,M_SHA256)" sSQL = sSQL & " VALUES("
For i = 0 to (UBound(myarray))
If IsNumeric(myarray(i)) Then 'Number sSQL = sSQL & myarray(i) & "," Else sSQL = sSQL & "'" & myarray(i) & "'," End If
'response.write myarray(i) & "<br/>"
Next
sSQL = left(sSQL, len(sSQL)-1) sSQL = sSQL & ")"
'set rsInsertRow = my_Conn.Execute(sSQL) rsInsertRow.Open sSQL,my_Conn,3,3 'rsInsertRow.close 'set rsInsertRow = nothing
response.write sSQL & "<br/>"
'response.write rsGetForumName(iCount) & "<br/>" rsGetForumName.moveNext
next
%>< |
quote: why did you not post this at Snitz?
The main reasons why this was not posted at Snitz and why I might not post the bugs I find directly at Snitz anymore are the ways "ruirib and HuwR" take pleasure to criticize just about anything I post and seem to resent the fact that I want to improve and correct Snitz which, I agree, serve as the original base for my own Forum.
These are some of the actions I find unacceptable: ruirib and HuwR take fun to Delete some of my topics, of my replies, locked or move my topic.
A topic posted last week from me to Davio in "Help: MOD Implementation" Forum as been deleted.
Two replies in my topic as been deleted about a bug on snitz topic page: http://forum.snitz.com/forum/topic.asp?whichpage=5.96&TOPIC_ID=44136#372029
A Fix to texanman as been deleted (first reply to texanman subject): http://forum.snitz.com/forum/topic.asp?TOPIC_ID=66162
One of my Multi-Language Topic on Snitz has disappeared last night Multi-Language and Multi-Language Skin3D http://forum.snitz.com/forum/topic.asp?TOPIC_ID=40765
etc...
3 times I changed my password and the day after the same game start.
Since I send to HuwR a donation of $200 on December 22, 2006 this guy HuwR has never stop to pick on every thing I post on the Snitz Forum.
I have even received from HuwR and ruirib an e-mail threatening to ban me from Snitz Forum :
Hello
You received the following message from: ruirib (ruirib@ruirib.net)
At: http://forum.snitz.com/forum/
It was a pleasure to have you there, hope you enjoyed the ride ;). And don't try to sneak in...
Goodbye ;).
Hey as_shole, I know it’s Davio who is a member at your forums, gonna lock him out too |
|
|
|
Topic |
|
|
|