Public Member Functions | |
LoginForm (&$request, $par= '') | |
Constructor. | |
execute () | |
addNewAccountMailPassword () | |
addNewAccount () | |
addNewAccountInternal () | |
initUser ($u, $autocreate) | |
Actually add a user to the database. | |
authenticateUserData () | |
Internally authenticate the login request. | |
attemptAutoCreate ($user) | |
Attempt to automatically create a user on login. | |
processLogin () | |
resetLoginForm ($error) | |
userNotPrivilegedMessage ($errors) | |
userBlockedMessage () | |
mainLoginForm ($msg, $msgtype= 'error') | |
showCreateOrLoginLink (&$user) | |
hasSessionCookie () | |
Check if a session cookie is present. | |
cookieRedirectCheck ($type) | |
onCookieRedirectCheck ($type) | |
makeLanguageSelector () | |
Produce a bar of links which allow the user to select another language during login/registration but retain "returnto". | |
makeLanguageSelectorLink ($text, $lang) | |
Create a language selector link for a particular language Links back to this page preserving type and returnto. | |
Public Attributes | |
const | SUCCESS = 0 |
const | NO_NAME = 1 |
const | ILLEGAL = 2 |
const | WRONG_PLUGIN_PASS = 3 |
const | NOT_EXISTS = 4 |
const | WRONG_PASS = 5 |
const | EMPTY_PASS = 6 |
const | RESET_PASS = 7 |
const | ABORTED = 8 |
const | CREATE_BLOCKED = 9 |
const | THROTTLED = 10 |
$mName | |
$mPassword | |
$mRetype | |
$mReturnTo | |
$mCookieCheck | |
$mPosted | |
$mAction | |
$mCreateaccount | |
$mCreateaccountMail | |
$mMailmypassword | |
$mLoginattempt | |
$mRemember | |
$mEmail | |
$mDomain | |
$mLanguage | |
$mSkipCookieCheck | |
Private Member Functions | |
mailPassword () | |
mailPasswordInternal ($u, $throttle=true, $emailTitle= 'passwordremindertitle', $emailText= 'passwordremindertext') | |
successfulLogin () | |
Run any hooks registered for logins, then HTTP redirect to $this->mReturnTo (or Main Page if that's undefined). | |
successfulCreation () | |
Run any hooks registered for logins, then display a message welcoming the user. | |
displaySuccessfulLogin ($msgname, $injected_html) | |
Display a "login successful" page. | |
throttleHit ($limit) |
Definition at line 24 of file SpecialUserlogin.php.
LoginForm::addNewAccount | ( | ) |
Definition at line 155 of file SpecialUserlogin.php.
References $error, $self, $u, $wgEmailAuthentication, $wgLoginLanguageSelector, $wgOut, $wgUser, addNewAccountInternal(), cookieRedirectCheck(), SpecialPage::getTitleFor(), hasSessionCookie(), WikiError::isError(), User::isValidEmailAddr(), successfulCreation(), wfMsgHtml(), wfMsgWikiHtml(), and wfRunHooks().
Referenced by execute().
LoginForm::addNewAccountInternal | ( | ) |
Definition at line 214 of file SpecialUserlogin.php.
References $key, $name, $u, $wgAccountCreationThrottle, $wgAuth, $wgEmailConfirmToEdit, $wgEnableSorbs, $wgMemc, $wgMinimalPasswordLength, $wgOut, $wgProxyWhitelist, $wgUser, initUser(), User::isValidEmailAddr(), mainLoginForm(), User::newFromName(), throttleHit(), userBlockedMessage(), userNotPrivilegedMessage(), wfDebug(), wfGetIP(), wfMemcKey(), wfMsg(), wfMsgExt(), wfReadOnly(), and wfRunHooks().
Referenced by addNewAccount().
LoginForm::addNewAccountMailPassword | ( | ) |
Definition at line 116 of file SpecialUserlogin.php.
References $result, $u, $wgOut, WikiError::isError(), mailPasswordInternal(), mainLoginForm(), wfMsg(), and wfRunHooks().
Referenced by execute().
LoginForm::attemptAutoCreate | ( | $ | user | ) |
Attempt to automatically create a user on login.
Only succeeds if there is an external authentication method which allows it.
Definition at line 493 of file SpecialUserlogin.php.
References $user, $wgAuth, $wgUser, initUser(), and wfDebug().
Referenced by authenticateUserData().
LoginForm::authenticateUserData | ( | ) |
Internally authenticate the login request.
This may create a local account as a side effect if the authentication plugin allows transparent local account creation.
Definition at line 380 of file SpecialUserlogin.php.
References $count, $status, $u, $wgAuth, $wgMemc, $wgPasswordAttemptThrottle, $wgUser, attemptAutoCreate(), User::isUsableName(), User::newFromName(), wfDebug(), wfGetIP(), wfMemcKey(), and wfRunHooks().
Referenced by processLogin().
LoginForm::cookieRedirectCheck | ( | $ | type | ) |
Definition at line 936 of file SpecialUserlogin.php.
References $type, $wgOut, and SpecialPage::getTitleFor().
Referenced by addNewAccount(), and processLogin().
LoginForm::displaySuccessfulLogin | ( | $ | msgname, | |
$ | injected_html | |||
) | [private] |
Display a "login successful" page.
Definition at line 738 of file SpecialUserlogin.php.
References $wgOut, $wgUser, and wfMsg().
Referenced by successfulCreation(), and successfulLogin().
LoginForm::execute | ( | ) |
Definition at line 95 of file SpecialUserlogin.php.
References addNewAccount(), addNewAccountMailPassword(), mailPassword(), mainLoginForm(), onCookieRedirectCheck(), and processLogin().
LoginForm::hasSessionCookie | ( | ) |
Check if a session cookie is present.
This will not pick up a cookie set during _this_ request, but is meant to ensure that the client is returning the cookie which was set on a previous pass through the system.
Definition at line 928 of file SpecialUserlogin.php.
References $wgDisableCookieCheck, and $wgRequest.
Referenced by addNewAccount(), onCookieRedirectCheck(), and processLogin().
LoginForm::initUser | ( | $ | u, | |
$ | autocreate | |||
) |
Actually add a user to the database.
Give it a User object that has been initialised with a name.
$u | User object. | |
$autocreate | boolean -- true if this is an autocreation via auth plugin |
Definition at line 346 of file SpecialUserlogin.php.
Referenced by addNewAccountInternal(), and attemptAutoCreate().
LoginForm::LoginForm | ( | &$ | request, | |
$ | par = '' | |||
) |
Constructor.
WebRequest | $request A WebRequest object passed by reference |
Definition at line 46 of file SpecialUserlogin.php.
References $wgAllowRealName, $wgAuth, $wgEnableEmail, $wgLang, and $wgRedirectOnLogin.
LoginForm::mailPassword | ( | ) | [private] |
Definition at line 598 of file SpecialUserlogin.php.
References $result, $u, $wgAuth, $wgOut, $wgPasswordReminderResendTime, $wgUser, WikiError::isError(), mailPasswordInternal(), mainLoginForm(), User::newFromName(), wfMsg(), wfMsgExt(), wfMsgWikiHtml(), and wfReadOnly().
Referenced by execute().
LoginForm::mailPasswordInternal | ( | $ | u, | |
$ | throttle = true , |
|||
$ | emailTitle = 'passwordremindertitle' , |
|||
$ | emailText = 'passwordremindertext' | |||
) | [private] |
object | user | |
bool | throttle | |
string | message name of email title | |
string | message name of email text |
Definition at line 665 of file SpecialUserlogin.php.
References $result, $u, $wgNewPasswordExpiry, $wgScript, $wgServer, $wgUser, wfGetIP(), wfMsg(), wfMsgExt(), and wfRunHooks().
Referenced by addNewAccountMailPassword(), and mailPassword().
LoginForm::mainLoginForm | ( | $ | msg, | |
$ | msgtype = 'error' | |||
) |
Definition at line 800 of file SpecialUserlogin.php.
References $msg, $wgAllowRealName, $wgAuth, $wgCookieExpiration, $wgCookiePrefix, $wgEmailConfirmToEdit, $wgEnableEmail, $wgLoginLanguageSelector, $wgOut, $wgUser, SpecialPage::getTitleFor(), makeLanguageSelector(), showCreateOrLoginLink(), userBlockedMessage(), wfMsg(), wfMsgHtml(), wfReadOnly(), wfRunHooks(), and wfUrlencode().
Referenced by addNewAccountInternal(), addNewAccountMailPassword(), execute(), mailPassword(), onCookieRedirectCheck(), processLogin(), and throttleHit().
LoginForm::makeLanguageSelector | ( | ) |
Produce a bar of links which allow the user to select another language during login/registration but retain "returnto".
Definition at line 980 of file SpecialUserlogin.php.
References $langs, $msg, $wgLang, makeLanguageSelectorLink(), wfEmptyMsg(), wfMsgForContent(), and wfMsgHtml().
Referenced by mainLoginForm().
LoginForm::makeLanguageSelectorLink | ( | $ | text, | |
$ | lang | |||
) |
Create a language selector link for a particular language Links back to this page preserving type and returnto.
$text | Link text | |
$lang | Language code |
Definition at line 1007 of file SpecialUserlogin.php.
References $self, $text, $wgUser, and SpecialPage::getTitleFor().
Referenced by makeLanguageSelector().
LoginForm::onCookieRedirectCheck | ( | $ | type | ) |
Definition at line 950 of file SpecialUserlogin.php.
References $type, $wgUser, hasSessionCookie(), mainLoginForm(), successfulLogin(), wfMsg(), and wfMsgExt().
Referenced by execute().
LoginForm::processLogin | ( | ) |
Definition at line 521 of file SpecialUserlogin.php.
References $code, $key, $wgAuth, $wgLang, $wgMemc, $wgRequest, $wgUser, authenticateUserData(), cookieRedirectCheck(), Language::factory(), hasSessionCookie(), mainLoginForm(), resetLoginForm(), successfulLogin(), userBlockedMessage(), wfGetIP(), wfMemcKey(), wfMsg(), and wfMsgWikiHtml().
Referenced by execute().
LoginForm::resetLoginForm | ( | $ | error | ) |
Definition at line 588 of file SpecialUserlogin.php.
References $error, $wgOut, and Xml::element().
Referenced by processLogin().
LoginForm::showCreateOrLoginLink | ( | &$ | user | ) |
Definition at line 909 of file SpecialUserlogin.php.
References $user.
Referenced by mainLoginForm().
LoginForm::successfulCreation | ( | ) | [private] |
Run any hooks registered for logins, then display a message welcoming the user.
Definition at line 725 of file SpecialUserlogin.php.
References $wgOut, $wgUser, displaySuccessfulLogin(), and wfRunHooks().
Referenced by addNewAccount().
LoginForm::successfulLogin | ( | ) | [private] |
Run any hooks registered for logins, then HTTP redirect to $this->mReturnTo (or Main Page if that's undefined).
Formerly we had a nice message here, but that's really not as useful as just being sent to wherever you logged in from. It should be clear that the action was successful, given the lack of error messages plus the appearance of your name in the upper right.
Definition at line 700 of file SpecialUserlogin.php.
References $wgOut, $wgUser, displaySuccessfulLogin(), Title::newFromText(), Title::newMainPage(), and wfRunHooks().
Referenced by onCookieRedirectCheck(), and processLogin().
LoginForm::throttleHit | ( | $ | limit | ) | [private] |
Definition at line 970 of file SpecialUserlogin.php.
References mainLoginForm(), and wfMsgExt().
Referenced by addNewAccountInternal().
LoginForm::userBlockedMessage | ( | ) |
Definition at line 771 of file SpecialUserlogin.php.
References $wgOut, $wgUser, wfGetIP(), wfMsg(), and User::whoIs().
Referenced by addNewAccountInternal(), mainLoginForm(), and processLogin().
LoginForm::userNotPrivilegedMessage | ( | $ | errors | ) |
Definition at line 755 of file SpecialUserlogin.php.
References $wgOut, and wfMsg().
Referenced by addNewAccountInternal().
LoginForm::$mAction |
Definition at line 39 of file SpecialUserlogin.php.
LoginForm::$mCookieCheck |
Definition at line 38 of file SpecialUserlogin.php.
LoginForm::$mCreateaccount |
Definition at line 39 of file SpecialUserlogin.php.
LoginForm::$mCreateaccountMail |
Definition at line 39 of file SpecialUserlogin.php.
LoginForm::$mDomain |
Definition at line 40 of file SpecialUserlogin.php.
LoginForm::$mEmail |
Definition at line 40 of file SpecialUserlogin.php.
LoginForm::$mLanguage |
Definition at line 40 of file SpecialUserlogin.php.
LoginForm::$mLoginattempt |
Definition at line 40 of file SpecialUserlogin.php.
LoginForm::$mMailmypassword |
Definition at line 39 of file SpecialUserlogin.php.
LoginForm::$mName |
Definition at line 38 of file SpecialUserlogin.php.
LoginForm::$mPassword |
Definition at line 38 of file SpecialUserlogin.php.
LoginForm::$mPosted |
Definition at line 38 of file SpecialUserlogin.php.
LoginForm::$mRemember |
Definition at line 40 of file SpecialUserlogin.php.
LoginForm::$mReturnTo |
Definition at line 38 of file SpecialUserlogin.php.
LoginForm::$mRetype |
Definition at line 38 of file SpecialUserlogin.php.
LoginForm::$mSkipCookieCheck |
Definition at line 40 of file SpecialUserlogin.php.
const LoginForm::ABORTED = 8 |
Definition at line 34 of file SpecialUserlogin.php.
const LoginForm::CREATE_BLOCKED = 9 |
const LoginForm::EMPTY_PASS = 6 |
const LoginForm::ILLEGAL = 2 |
const LoginForm::NO_NAME = 1 |
const LoginForm::NOT_EXISTS = 4 |
const LoginForm::RESET_PASS = 7 |
Definition at line 33 of file SpecialUserlogin.php.
const LoginForm::SUCCESS = 0 |
const LoginForm::THROTTLED = 10 |
const LoginForm::WRONG_PASS = 5 |
const LoginForm::WRONG_PLUGIN_PASS = 3 |