Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Meaning of M_USERNAME field
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ankur
Starting Member

7 Posts

Posted - 22 July 2003 :  11:00:28  Show Profile
Hi,
I am trying to mass add users, and I was following the discussion thread with that subject. However, I don't understand what M_USERNAME is. From what I can see M_NAME is where the user's nick is stored, so what value do I need to be putting into M_USERNAME?

Thanks,
-Ankur
quote:
Originally posted by davemaxwell

Can you do mass adds to the forum within the base code? No

How would you accomplish it?

Essentially, you would need to establish a list of records which you want to have added. You would then need to loop through that list and insert records into the members table, ensuring that the following fields get inserted for sure: M_NAME, M_USERNAME, M_PASSWORD, M_LEVEL, M_EMAIL and M_SHA256. Some things to make sure of:

1) M_NAME is unique
2) M_PASSWORD gets run through the Sha256 encryption algorithm first.
3) M_LEVEL and M_SHA256 are each set to 1
4) M_EMAIL is set.

Do you want to require activation? If so, then your methodology would be slightly different. You'd have to insert them into the MEMBERS_PENDING table and send out emails with the link with the appropriate activation key.

A good step would be to look through register.asp and see what code you can swipe out of there...

work mule
Senior Member

USA
1358 Posts

Posted - 22 July 2003 :  11:05:46  Show Profile
M_NAME is for when you're using database authentication.
M_USERNAME is for when you're using NT authentication.

So most likely you're not using NT authentication, so that field would be empty.
Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 22 July 2003 :  11:20:32  Show Profile
BTW, if you're importing the records from another table and you have a field that's in a regular date/time format and you want to import it into Snitz, you could something like the following (dtRegistered & dtSiteLastAccessed were originally datetime fields):

Note: This SQL statement was written for use in SQL Server.

SET IDENTITY_INSERT new_database.dbo.FORUM_MEMBERS ON

INSERT INTO new_database.dbo.FORUM_MEMBERS
(
  MEMBER_ID
, M_NAME
, M_PASSWORD
, M_DATE
, M_LASTHEREDATE
, M_EMAIL
, M_SHA256
)
SELECT
  idProfile
, chrUserName
, chrPassword
, (CASE
   WHEN ISDATE(dtRegistered)=1 THEN LEFT(REPLACE(REPLACE(REPLACE(CONVERT(varchar(20),dtRegistered,20),':',''),' ',''),'-',''),14)
   ELSE ''
  END)
, (CASE
   WHEN ISDATE(dtSiteLastAccessed)=1 THEN LEFT(REPLACE(REPLACE(REPLACE(CONVERT(varchar(20),dtSiteLastAccessed,20),':',''),' ',''),'-',''),14)
   ELSE ''
  END)
, chrEmail
, 0
FROM old_database.dbo.Profiles

SET IDENTITY_INSERT new_database.dbo.FORUM_MEMBERS OFF


After that has run, then I run an ASP script that selects all records where the M_SHA256 field = 0, encrypts the password and updates the record with the encrypted password and sets M_SHA256 to 1.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07