Changeset 2441 for trunk/modules/auth

Show
Ignore:
Timestamp:
04/06/2008 03:30:26 PM (8 months ago)
Author:
Shadowhand
Message:

Changes to Auth:

  • Reverted r2391
  • Added $user->last_login column
Location:
trunk/modules/auth
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/auth/controllers/auth_demo.php

    r2391 r2441  
    8686 
    8787                                // Attempt a login 
    88                                 if ($user->has_role('login') AND $this->auth->login($user, $form->password->value)) 
     88                                if ($this->auth->login($user, $form->password->value)) 
    8989                                { 
    9090                                        echo '<h4>Login Success!</h4>'; 
  • trunk/modules/auth/libraries/Auth.php

    r2396 r2441  
    116116 
    117117                // If the passwords match, perform a login 
    118                 if ($user->password === $password) 
     118                if ($user->has_role('login') AND $user->password === $password) 
    119119                { 
    120120                        if ($remember === TRUE) 
     
    311311                $user->logins += 1; 
    312312 
     313                // Set the last login date 
     314                $user->last_login = time(); 
     315 
    313316                // Save the user 
    314317                $user->save(); 
  • trunk/modules/auth/views/auth/install.php

    r2410 r2441  
    1919  `password` char(50) NOT NULL, 
    2020  `logins` int(10) unsigned NOT NULL default '0', 
     21  `last_login` int(10) unsigned, 
    2122  PRIMARY KEY  (`id`), 
    2223  UNIQUE KEY `uniq_username` (`username`),