update multi language login site
CR: sonhh (fake)
This commit is contained in:
@@ -43,11 +43,18 @@ class LoginForm extends Model {
|
||||
if (!$this->hasErrors()) {
|
||||
$user = $this->getUser();
|
||||
if (!$user || !$user->validatePassword($this->password)) {
|
||||
$this->addError($attribute, 'Incorrect username or password.');
|
||||
$this->addError($attribute, Yii::t("app", "TEN_DANG_NHAP_HOAC_MAT_KHAU_KHONG_DUNG"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function attributeLabels() {
|
||||
return [
|
||||
'username' => Yii::t("app", "TEN_DANG_NHAP"),
|
||||
'password' => Yii::t("app", "MAT_KHAU")
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs in a user using the provided username and password.
|
||||
* @return bool whether the user is logged in successfully
|
||||
|
||||
Reference in New Issue
Block a user