Hi,

i dont want to allow logins of users which are disabled in database.
the column of table 'users' for this is called 'enabled'.
Now i used userScope but it seems to have any effect, cause i can
login with users that have its 'enabled' on 0...
I checked the var 'loginAction' to check if the configuration doesn't
work at all, but i am able to use this var successfully...

Somebody can help me? Thanks :)

class AppController extends Controller {

        var $components = array('Auth');

        function beforeFilter(){
                if(isset($this->Auth)){
                        $this->Auth->userScope = array('User.enabled' => 1);
                        $this->Auth->loginAction = '/users/login';
                }
        }
}

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to