I like Mark's suggestion (repeated below) of having accounts sorted by email address. It does, however, remove the 'RP' of logging in using a name (weak argument I know). Personally, my biggest problem would be if the email address was [EMAIL PROTECTED] Pain to type.

One more alternative though is that your accounts could be stored in a MySQL database. Then a "SELECT id FROM accounts WHERE email = '%s' LIMIT 1" would pull the first account found with the email (no sense pulling the whole list if by some hack of the admins there are more than one account with the same email...) so a mysql_num_rows() > 0 would tell you if their new or not. If the email field is indexed properly, should take all of 0.0085 seconds for 400 accounts (random figures, but you get the idea).

Ammaross Danan
Realms of the Forgotten
telnet://www.rotf.net:5000
http://www.rotf.net

Mark Roberts wrote:
Honestly, the 2nd option is probably the cleanest and most efficient way to 
validate accounts my email address.

I would store all account information by email address either in a single 
account file or in a subdirectory containing all pfiles for that player.

Example:
You have 5 players, bob, sue, john, ellen, and michael (all @example.com).  You 
might have such a directory structure as this:

~/accts/[EMAIL PROTECTED]/bob.pfile

~/accts/[EMAIL PROTECTED]/sue.pfile
~/accts/[EMAIL PROTECTED]/irtehleetkillar.pfile

~/accts/[EMAIL PROTECTED]/john.pfile

~/accts/[EMAIL PROTECTED]/ellen.pfile

~/accts/[EMAIL PROTECTED]/michael.pfile
~/accts/[EMAIL PROTECTED]/korteliandree4431.pfile
~/accts/[EMAIL 
PROTECTED]/somesillynamethaticannotpronouncegivenadictionaryandacompass.pfile

Now, someone goes to log into your system.  They log in with the name [EMAIL 
PROTECTED] (or try to log in anyway)

We'll notice there is no accts/[EMAIL PROTECTED] directory.  So we immediately 
know that we have to create a new account.

Now, [EMAIL PROTECTED] decides to come play, and you immediately notice that 
there is a [EMAIL PROTECTED] directory.
So you get a list of all the .pfile's in the directory and present them as 
character choices to play as.

Mark

--
ROM mailing list
[email protected]
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom

Reply via email to