Commit e945554e authored by Олег Гиммельшпах's avatar Олег Гиммельшпах

Merge branch 'master' of git.task-on.com:ktask/task-on.com

# Conflicts:
#	frontend/web/css/screen.css
#	frontend/web/js/common.js
parents bc1295c7 daf3bac0
......@@ -32,6 +32,7 @@ class LoginForm extends Model
['phone','safe'],
// password is validated by validatePassword()
['password', 'validatePassword'],
['username', 'validateStatus'],
];
}
......@@ -52,6 +53,23 @@ class LoginForm extends Model
}
}
/**
* Validates the status.
* This method serves as the inline validation for status.
*
* @param string $attribute the attribute currently being validated
* @param array $params the additional name-value pairs given in the rule
*/
public function validateStatus($attribute, $params)
{
if (!$this->hasErrors()) {
$user = $this->getUser();
if ($user->status != User::STATUS_ACTIVE) {
$this->addError($attribute, 'Пожалуйста, активируйте свой аккаунт.');
}
}
}
/**
* Logs in a user using the provided username and password.
*
......
......@@ -97,7 +97,7 @@
<div class="row">
<div class="col-md-3 col-xs-3 col-sm-12">
<div class="foot_logo">
<img src="images/foot_logo.png" height="51" width="192" alt="">
<img src="/images/foot_logo.png" height="51" width="192" alt="">
</div>
</div>
<div class="col-md-6 col-xs-6 col-sm-12">
......@@ -111,7 +111,7 @@
</ul>
</div>
<div class="col-md-3 col-xs-3 col-sm-12">
<div class="taskon"><img src="images/taskon.png" height="31" width="100" alt=""></div>
<div class="taskon"><img src="/images/taskon.png" height="31" width="100" alt=""></div>
<div class="copyring">Powered by Taskon <br> Собственная разработка Арт Проект</div>
</div>
</div>
......
......@@ -246,7 +246,7 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
*/
public static function findByUsername($username)
{
return static::findOne(['email' => $username, 'status' => self::STATUS_ACTIVE]);
return static::findOne(['email' => $username/*, 'status' => self::STATUS_ACTIVE*/]);
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment