+ userZen: add a method to response when user is locked.

This commit is contained in:
liugang
2023-11-28 09:01:47 +08:00
parent 0fb2212b8c
commit 04d58c4b51
+16
View File
@@ -333,6 +333,22 @@ class userZen extends user
return array('result' => 'success', 'locate' => $locateReferer);
}
/**
* 用户被锁定时的响应。
* Response when user is locked.
*
* @param string $viewType
* @access public
* @return array
*/
public function responseForLocked(string $viewType): array
{
$message = sprintf($this->lang->user->loginLocked, $this->config->user->lockMinutes);
if($viewType == 'json') return array('status' => 'failed', 'reason' => $message);
return array('result' => 'fail', 'message' => $message);
}
/**
* 设置来源地址。
* Set referer.