本文整理匯總了PHP中AuthManager::getFailureMessage方法的典型用法代碼示例。如果您正苦於以下問題:PHP AuthManager::getFailureMessage方法的具體用法?PHP AuthManager::getFailureMessage怎麽用?PHP AuthManager::getFailureMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AuthManager
的用法示例。
在下文中一共展示了AuthManager::getFailureMessage方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isset
$cidRequired = isset($_REQUEST['cidRequired']) ? $_REQUEST['cidRequired'] : false;
//TODO: possibility to continue in anonymous
$uidRequired = true;
// The script needs the user to be authentificated
if (!claro_is_user_authenticated() && $uidRequired) {
$defaultLoginValue = '';
$dialogBox = new DialogBox();
if (isset($_SESSION['lastUserName'])) {
$defaultLoginValue = strip_tags($_SESSION['lastUserName']);
unset($_SESSION['lastUserName']);
}
if (get_conf('claro_displayLocalAuthForm', true) == true) {
if ($claro_loginRequested && !$claro_loginSucceeded) {
if (AuthManager::getFailureMessage()) {
// need to use get_lang two times...
$dialogBox->error(get_lang(AuthManager::getFailureMessage()));
} else {
$dialogBox->error(get_lang('Login failed.') . ' ' . get_lang('Please try again.'));
}
if (get_conf('allowSelfReg', false)) {
$dialogBox->warning(get_lang('If you haven\'t a user account yet, use the <a href="%url">the account creation form</a>.', array('%url' => get_path('url') . '/claroline/auth/inscription.php')));
} else {
$dialogBox->error(get_lang('Contact your administrator.'));
}
$dialogBox->warning(get_lang('Warning the system distinguishes uppercase (capital) and lowercase (small) letters'));
}
if (get_conf('claro_secureLogin', false)) {
$formAction = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
} else {
$formAction = $_SERVER['PHP_SELF'];
}