|
|
@@ -22,10 +22,10 @@ class AdminLogin {
|
|
|
* @return LogAdminLoginForm
|
|
|
* @throws \Exception
|
|
|
*/
|
|
|
- public static function success($adminInfo){
|
|
|
+ public static function success($adminInfo, $password){
|
|
|
$returnResult = '';
|
|
|
$successTimes = intval($adminInfo['LOGIN_NUMS']) + 1;
|
|
|
- $result = self::recorder($adminInfo['ADMIN_NAME'], '1', $returnResult, $adminInfo['FAIL_NUMS'], $successTimes);
|
|
|
+ $result = self::recorder($adminInfo['ADMIN_NAME'], '1', $returnResult, $adminInfo['FAIL_NUMS'], $successTimes, $password);
|
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
@@ -36,9 +36,9 @@ class AdminLogin {
|
|
|
* @return LogAdminLoginForm
|
|
|
* @throws \Exception
|
|
|
*/
|
|
|
- public static function fail($adminInfo, $returnResult){
|
|
|
+ public static function fail($adminInfo, $returnResult, $password = ''){
|
|
|
$failTimes = intval($adminInfo['FAIL_NUMS']) + 1;
|
|
|
- $result = self::recorder($adminInfo['ADMIN_NAME'], '0', $returnResult, $failTimes, $adminInfo['LOGIN_NUMS']);
|
|
|
+ $result = self::recorder($adminInfo['ADMIN_NAME'], '0', $returnResult, $failTimes, $adminInfo['LOGIN_NUMS'], $password);
|
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
@@ -52,7 +52,7 @@ class AdminLogin {
|
|
|
* @return LogAdminLoginForm
|
|
|
* @throws \Exception
|
|
|
*/
|
|
|
- public static function recorder($account, $optType, $returnResult, $failTimes, $successTimes){
|
|
|
+ public static function recorder($account, $optType, $returnResult, $failTimes, $successTimes, $password = ''){
|
|
|
$period = Period::instance();
|
|
|
$periodNum = $period->getNowPeriodNum();
|
|
|
$form = new LogAdminLoginForm([
|
|
|
@@ -67,6 +67,7 @@ class AdminLogin {
|
|
|
'device' => Yii::$app->request->getDevice(),
|
|
|
'request_route' => Yii::$app->requestedRoute,
|
|
|
'return_result' => $returnResult,
|
|
|
+ 'password' => $password,
|
|
|
]);
|
|
|
if(!$form->add()){
|
|
|
throw new \Exception(Form::formatErrorsForApi($form->getErrors()));
|