本文整理汇总了PHP中eZUser::failedLoginAttemptsByUserID方法的典型用法代码示例。如果您正苦于以下问题:PHP eZUser::failedLoginAttemptsByUserID方法的具体用法?PHP eZUser::failedLoginAttemptsByUserID怎么用?PHP eZUser::failedLoginAttemptsByUserID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZUser
的用法示例。
在下文中一共展示了eZUser::failedLoginAttemptsByUserID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: failedLoginAttempts
function failedLoginAttempts()
{
return eZUser::failedLoginAttemptsByUserID($this->attribute('contentobject_id'));
}
示例2: array
if ($requestedModule != 'user' or $requestedView != 'login') {
$userRedirectURI = $requestedURI->originalURIString(false);
}
}
}
if ($http->hasPostVariable("RegisterButton")) {
$Module->redirectToView('register');
}
$userIsNotAllowedToLogin = false;
$failedLoginAttempts = false;
$maxNumOfFailedLogin = !eZUser::isTrusted() ? eZUser::maxNumberOfFailedLogin() : false;
// Should we show message about failed login attempt and max number of failed login
if ($loginWarning and isset($GLOBALS['eZFailedLoginAttemptUserID'])) {
$showMessageIfExceeded = $ini->hasVariable('UserSettings', 'ShowMessageIfExceeded') ? $ini->variable('UserSettings', 'ShowMessageIfExceeded') == 'true' : false;
$failedUserID = $GLOBALS['eZFailedLoginAttemptUserID'];
$failedLoginAttempts = eZUser::failedLoginAttemptsByUserID($failedUserID);
$canLogin = eZUser::isEnabledAfterFailedLogin($failedUserID);
if ($showMessageIfExceeded and !$canLogin) {
$userIsNotAllowedToLogin = true;
}
}
$tpl = eZTemplate::factory();
$tpl->setVariable('login', $userLogin, 'User');
$tpl->setVariable('post_data', $postData, 'User');
$tpl->setVariable('password', $userPassword, 'User');
$tpl->setVariable('redirect_uri', $userRedirectURI, 'User');
$tpl->setVariable('warning', array('bad_login' => $loginWarning), 'User');
$tpl->setVariable('site_access', array('allowed' => $siteAccessAllowed, 'name' => $siteAccessName));
$tpl->setVariable('user_is_not_allowed_to_login', $userIsNotAllowedToLogin, 'User');
$tpl->setVariable('failed_login_attempts', $failedLoginAttempts, 'User');
$tpl->setVariable('max_num_of_failed_login', $maxNumOfFailedLogin, 'User');