|
|
@@ -235,7 +235,9 @@ function bx_check_password($sLogin, $sPassword, $iRole = BX_DOL_ROLE_MEMBER)
|
|
|
|
|
|
if ($oAccount->isLocked()){
|
|
|
bx_import('BxDolLanguages');
|
|
|
- return _t("_sys_txt_login_locked", bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password')));
|
|
|
+ if (bx_is_api()){
|
|
|
+ return [strip_tags(_t("_sys_txt_login_locked", bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password'))),''), bx_api_get_relative_url(BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password'))];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
$aAccountInfo = $oAccount->getInfo();
|
|
|
@@ -264,7 +266,9 @@ function bx_check_password($sLogin, $sPassword, $iRole = BX_DOL_ROLE_MEMBER)
|
|
|
if ($aAccountInfo['login_attempts'] >= $iMaxLoginAttempts){
|
|
|
$oAccountQuery->lockAccount($aAccountInfo['id'], 1);
|
|
|
bx_import('BxDolLanguages');
|
|
|
- return _t("_sys_txt_login_locked", bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password')));
|
|
|
+ if (bx_is_api()){
|
|
|
+ return [strip_tags(_t("_sys_txt_login_locked", bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password'))),''), bx_api_get_relative_url(BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password'))];
|
|
|
+ }
|
|
|
}
|
|
|
else{
|
|
|
$oAccountQuery->updateAttemptsCounter($aAccountInfo['id']);
|