LoginForm Class Reference
[SpecialPage]

implements Special:Login More...

List of all members.

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)


Detailed Description

implements Special:Login

Definition at line 24 of file SpecialUserlogin.php.


Member Function Documentation

LoginForm::addNewAccount (  ) 

LoginForm::addNewAccountInternal (  ) 

LoginForm::addNewAccountMailPassword (  ) 

Access:
private

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.

Returns:
integer Status code

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.

Access:
public

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  ) 

Access:
private

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 (  ) 

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.

Access:
private

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.

Parameters:
$u User object.
$autocreate boolean -- true if this is an autocreation via auth plugin
Returns:
User object.
Access:
private

Definition at line 346 of file SpecialUserlogin.php.

References $u, and $wgAuth.

Referenced by addNewAccountInternal(), and attemptAutoCreate().

LoginForm::LoginForm ( &$  request,
par = '' 
)

Constructor.

Parameters:
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]

LoginForm::mailPasswordInternal ( u,
throttle = true,
emailTitle = 'passwordremindertitle',
emailText = 'passwordremindertext' 
) [private]

Parameters:
object user
bool throttle
string message name of email title
string message name of email text
Returns:
mixed true on success, WikiError on failure

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' 
)

LoginForm::makeLanguageSelector (  ) 

Produce a bar of links which allow the user to select another language during login/registration but retain "returnto".

Returns:
string

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.

Parameters:
$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  ) 

Access:
private

Definition at line 950 of file SpecialUserlogin.php.

References $type, $wgUser, hasSessionCookie(), mainLoginForm(), successfulLogin(), wfMsg(), and wfMsgExt().

Referenced by execute().

LoginForm::processLogin (  ) 

LoginForm::resetLoginForm ( error  ) 

Definition at line 588 of file SpecialUserlogin.php.

References $error, $wgOut, and Xml::element().

Referenced by processLogin().

LoginForm::showCreateOrLoginLink ( &$  user  ) 

Access:
private

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().


Member Data Documentation

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.

Definition at line 35 of file SpecialUserlogin.php.

Referenced by ApiLogin::execute().

Definition at line 32 of file SpecialUserlogin.php.

Referenced by ApiLogin::execute().

const LoginForm::ILLEGAL = 2

Definition at line 28 of file SpecialUserlogin.php.

Referenced by ApiLogin::execute().

const LoginForm::NO_NAME = 1

Definition at line 27 of file SpecialUserlogin.php.

Referenced by ApiLogin::execute().

Definition at line 30 of file SpecialUserlogin.php.

Referenced by ApiLogin::execute().

Definition at line 33 of file SpecialUserlogin.php.

const LoginForm::SUCCESS = 0

Definition at line 26 of file SpecialUserlogin.php.

Referenced by ApiLogin::execute().

Definition at line 36 of file SpecialUserlogin.php.

Referenced by ApiLogin::execute().

Definition at line 31 of file SpecialUserlogin.php.

Referenced by ApiLogin::execute().

Definition at line 29 of file SpecialUserlogin.php.

Referenced by ApiLogin::execute().


The documentation for this class was generated from the following file:

Generated on Sat Sep 5 02:08:41 2009 for MediaWiki by  doxygen 1.5.9