Changeset 3399 for trunk/modules/auth

Show
Ignore:
Timestamp:
08/29/2008 12:55:45 PM (3 months ago)
Author:
Shadowhand
Message:

Follow up to r3398, fixing some more r3366 stuff

Location:
trunk/modules/auth
Files:
1 removed
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/auth/classes/auth.php

    r3398 r3399  
    5959 
    6060                // Set the driver class name 
    61                 $driver = 'Auth_'.$config['driver'].'_Driver'; 
     61                $driver = 'Auth_Driver_'.$config['driver']; 
    6262 
    6363                if ( ! Kohana::auto_load($driver)) 
  • trunk/modules/auth/classes/auth/driver/orm.php

    r3398 r3399  
    3737                // Checks if a user is logged in and valid 
    3838                if ( ! empty($_SESSION['auth_user']) AND is_object($_SESSION['auth_user']) 
    39                         AND ($_SESSION['auth_user'] instanceof User_Model) AND $_SESSION['auth_user']->loaded) 
     39                        AND ($_SESSION['auth_user'] instanceof Model_User) AND $_SESSION['auth_user']->loaded) 
    4040                { 
    4141                        // Everything is okay so far 
     
    4545                        { 
    4646                                // Check that the user has the given role 
    47                                 $status = $_SESSION['auth_user']->has(new Role_Model($role)); 
     47                                $status = $_SESSION['auth_user']->has(ORM::factory('role', $role)); 
    4848                        } 
    4949                } 
     
    6161 
    6262                // If the passwords match, perform a login 
    63                 if ($user->has(new Role_Model('login')) AND $user->password === $password) 
     63                if ($user->has(ORM::factory('role', 'login')) AND $user->password === $password) 
    6464                { 
    6565                        if ($remember === TRUE) 
     
    175175         * @return  void 
    176176         */ 
    177         protected function complete_login(User_Model $user) 
     177        protected function complete_login(Model_User $user) 
    178178        { 
    179179                // Update the number of logins