Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
yupe committed Apr 30, 2016
2 parents 84c714f + 2007ccc commit 35a0b4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions protected/modules/user/controllers/account/LoginAction.php
Expand Up @@ -29,15 +29,15 @@ public function run()

$badLoginCount = Yii::app()->authenticationManager->getBadLoginCount(Yii::app()->getUser());

$scenario = $badLoginCount > (int)$module->badLoginCount ? LoginForm::LOGIN_LIMIT_SCENARIO : '';
$scenario = $badLoginCount >= (int)$module->badLoginCount ? LoginForm::LOGIN_LIMIT_SCENARIO : '';

$form = new LoginForm($scenario);

if (Yii::app()->getRequest()->getIsPostRequest() && !empty($_POST['LoginForm'])) {

$form->setAttributes(Yii::app()->getRequest()->getPost('LoginForm'));

if ($form->validate() && Yii::app()->authenticationManager->login(
if (Yii::app()->authenticationManager->login(
$form,
Yii::app()->getUser(),
Yii::app()->getRequest()
Expand Down

0 comments on commit 35a0b4c

Please sign in to comment.