Please rip my code to pieces: generic user management class
View Single Post
08-25-2008, 05:00 AM
Join Date: Nov 2007
I've stopped relying upon getmxrr(), there are various reasons why, but what it comes down to is it's not reliable.
If you want to make sure the user has a working e-mail address just send a verification e-mail + activation code.
Also be aware that $_SERVER['HTTP_USER_AGENT']; can change while a user is logged in with some browsers.
You also switch between using boolean values, and doing if conditions and checking for 1 for true.
I'd recommend just using one convention, and maybe even using '===' to check your value and type.
Also, your functions only return strings if there's an error, if you ask me, that's what the $errormessge array is for.
Inside of classes you should return a true or false, and then retrieving your output from another getter.
Hope that helps a little.
Where I Ramble:
What I do:
Zynga Game Network
Senior Software Engineer at
View Public Profile
Send a private message to dschreck
Visit dschreck's homepage!
Find More Posts by dschreck