I have ported entire code from another project to my new Yii 1.1.12
project. It original one, anything worked just fine.
In my new project (though I touched nothing in login area) any attempt to display login form (or request to any action, that requires user to be logged in) ends in Login
model attempting to actually login user.
When I request any action, that requires login, Yii "internals" redirect me to actionLogin
of my main site
controller. But, instead of login form being rendered, I'm getting a bit strange exception:
CDbException: CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'login' in 'where clause'. The SQL statement executed was: SELECT * FROM `users` `t` WHERE LOWER(login)=? LIMIT 1
Some internal tests proven, that first line of my loginAction()
in my site
controller:
if(Yii::app()->user->isGuest)
{
$model = new Login;
...
}
causes actual attempt to login user. Has anyone got any idea, what is going on here?
I have never run into situation, in any of my Yii projects, that creation of Login
model actually attempts to login user, when $_POST
is empty (no form was ever rendered, so no POST data was ever submitted) and when user code does not execute $model->login()
.
Edit: This is a standard Yii method (though still mysterious to me), so I asked another question on this.
Can anyone help here or advice, what could be wrong, or what am I missing?