View Single Post
Old 03-20-2008, 03:08 PM   #9 (permalink)
freenity
The Acquainted
 
freenity's Avatar
 
Join Date: Feb 2008
Posts: 119
Thanks: 17
freenity is on a distinguished road
Default

I would suggest a bit different approach. What login should do? I suppose create a session/cookies, etc
So that's what I would prefer:

PHP Code:
$user = new Member('username','pass');
if (
$user->auth())    //checks if the password and username are correct
    
$user->login();   //sets the cookies, etc 
or maybe put the auth() part inside the login() and make it return true or false if the username/pass are correct or not.
__________________
http://feudal-times.net - My PBB Game
http://gwphp.feudal-times.net - My Blog "Gaming With PHP"
freenity is offline  
Reply With Quote