Go to the documentation of this file.
34 parent::__construct(
'Confirmemail',
'editmyprivateinfo' );
52 if ( !$this->
getUser()->isAllowed(
'viewmyprivateinfo' ) ) {
56 if ( $code ===
null || $code ===
'' ) {
60 $this->
getOutput()->addWikiMsg(
'confirmemail_noemail' );
75 $user->matchEditToken( $this->getRequest()->getText(
'token' ) )
77 $status =
$user->sendConfirmationMail();
78 if ( $status->isGood() ) {
79 $out->addWikiMsg(
'confirmemail_sent' );
81 $out->addWikiText( $status->getWikiText(
'confirmemail_sendfailed' ) );
83 } elseif (
$user->isEmailConfirmed() ) {
88 $emailAuthenticated =
$user->getEmailAuthenticationTimestamp();
89 $time = $lang->userTimeAndDate( $emailAuthenticated,
$user );
90 $d = $lang->userDate( $emailAuthenticated,
$user );
91 $t = $lang->userTime( $emailAuthenticated,
$user );
92 $out->addWikiMsg(
'emailauthenticated',
$time, $d,
$t );
94 if (
$user->isEmailConfirmationPending() ) {
96 "<div class=\"error mw-confirmemail-pending\">\n$1\n</div>",
97 'confirmemail_pending'
101 $out->addWikiMsg(
'confirmemail_text' );
121 if ( !is_object(
$user ) ) {
122 $this->
getOutput()->addWikiMsg(
'confirmemail_invalid' );
127 $user->confirmEmail();
128 $user->saveSettings();
129 $message = $this->
getUser()->isLoggedIn() ?
'confirmemail_loggedin' :
'confirmemail_success';
130 $this->
getOutput()->addWikiMsg( $message );
132 if ( !$this->
getUser()->isLoggedIn() ) {
147 parent::__construct(
'Invalidateemail',
'editmyprivateinfo' );
165 if ( !is_object(
$user ) ) {
166 $this->
getOutput()->addWikiMsg(
'confirmemail_invalid' );
171 $user->invalidateEmail();
172 $user->saveSettings();
173 $this->
getOutput()->addWikiMsg(
'confirmemail_invalidated' );
175 if ( !$this->
getUser()->isLoggedIn() ) {
attemptInvalidate( $code)
Attempt to invalidate the user's email address and show success or failure as needed; if successful,...
getPageTitle( $subpage=false)
Get a self-referential title object.
see documentation in includes Linker php for Linker::makeImageLink & $time
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
getOutput()
Get the OutputPage being used for this instance.
Shortcut to construct a special page which is unlisted by default.
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
usually copyright or history_copyright This message must be in HTML not wikitext $subpages will be ignored and the rest of subPageSubtitle() will run. 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' whether MediaWiki currently thinks this is a CSS JS page Hooks may change this value to override the return value of Title::isCssOrJsPage(). 'TitleIsAlwaysKnown' whether MediaWiki currently thinks this page is known isMovable() always returns false. $title whether MediaWiki currently thinks this page is movable Hooks may change this value to override the return value of Title::isMovable(). 'TitleIsWikitextPage' whether MediaWiki currently thinks this is a wikitext page Hooks may change this value to override the return value of Title::isWikitextPage() 'TitleMove' use UploadVerification and UploadVerifyFile instead $form
checkPermissions()
Checks if userCanExecute, and if not throws a PermissionsError.
static validateEmail( $addr)
Does a string look like an e-mail address?
showRequestForm()
Show a nice form for the user to request a confirmation mail.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name.
execute( $code)
Main execution point.
static hidden( $name, $value, $attribs=array())
Convenience function to produce an input element with type=hidden.
Show an error when a user tries to do something they do not have the necessary permissions for.
getLanguage()
Shortcut to get user's language.
requireLogin( $reasonMsg=null, $titleMsg=null)
If the user is not logged in, throws UserNotLoggedIn error.
static closeElement( $element)
Returns "</$element>", except if $wgWellFormedXml is off, in which case it returns the empty string w...
static openElement( $element, $attribs=array())
Identical to rawElement(), but has no third parameter and omits the end tag (and the self-closing '/'...
attemptConfirm( $code)
Attempt to confirm the user's email address and show success or failure as needed; if successful,...
static newFromConfirmationCode( $code)
Factory method to fetch whichever user has a given email confirmation code.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getUser()
Shortcut to get the User executing this instance.
presenting them properly to the user as errors is done by the caller $title
execute( $code)
Default execute method Checks user permissions, calls the function given in mFunction.
msg()
Wrapper around wfMessage that sets the current context.
getRequest()
Get the WebRequest being used for this instance.
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
Special page allows users to request email confirmation message, and handles processing of the confir...
Special page allows users to cancel an email confirmation using the e-mail confirmation code.
static submitButton( $value, $attribs=array())
Convenience function to build an HTML submit button.
checkReadOnly()
If the wiki is currently in readonly mode, throws a ReadOnlyError.