Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Import Users from mailing list

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
amitch 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
<
4   L A T E S T    R E P L I E S    (Newest First)
emperezg 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

%><
laser 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.<
amitch 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 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.<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000 Version 3.4.07