34 parent::__construct(
'Confirmemail',
'editmyprivateinfo' );
60 if ( !$this->
getUser()->isAllowed(
'viewmyprivateinfo' ) ) {
69 $this->
getOutput()->addWikiMsg(
'confirmemail_noemail' );
72 $old = $trxProfiler->setSilenced(
true );
74 $trxProfiler->setSilenced( $old );
85 if ( !
$user->isEmailConfirmed() ) {
87 if (
$user->isEmailConfirmationPending() ) {
92 'default' =>
"<div class=\"error mw-confirmemail-pending\">\n" .
93 $this->
msg(
'confirmemail_pending' )->escaped() .
99 $out->addWikiMsg(
'confirmemail_text' );
102 ->setMethod(
'post' )
104 ->setSubmitTextMsg(
'confirmemail_send' )
105 ->setSubmitCallback( [ $this,
'submitSend' ] );
111 $out->addWikiMsg(
'confirmemail_sent' );
120 $emailAuthenticated =
$user->getEmailAuthenticationTimestamp();
122 $d =
$lang->userDate( $emailAuthenticated,
$user );
124 $out->addWikiMsg(
'emailauthenticated',
$time, $d,
$t );
139 $status->getWikiText(
'confirmemail_sendfailed' )
152 if ( !is_object(
$user ) ) {
153 $this->
getOutput()->addWikiMsg(
'confirmemail_invalid' );
158 $user->confirmEmail();
159 $user->saveSettings();
160 $message = $this->
getUser()->isLoggedIn() ?
'confirmemail_loggedin' :
'confirmemail_success';
161 $this->
getOutput()->addWikiMsg( $message );
163 if ( !$this->
getUser()->isLoggedIn() ) {
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output $out
Shortcut to construct a special page which is unlisted by default.
getContext()
Gets the context this SpecialPage is executed in.
static getTitleFor($name, $subpage=false, $fragment= '')
Get a localised Title object for a specified special page name If you don't need a full Title object...
static newFatal($message)
Factory function for fatal errors.
static instance()
Singleton.
if(!isset($args[0])) $lang
msg()
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.
Special page allows users to request email confirmation message, and handles processing of the confir...
showRequestForm()
Show a nice form for the user to request a confirmation mail.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes! ...
namespace and then decline to actually register it file or subcat img or subcat $title
static newGood($value=null)
Factory function for good results.
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
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable & $code
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 local account $user
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
static newFromConfirmationCode($code, $flags=0)
Factory method to fetch whichever user has a given email confirmation code.
Variant of the Message class.
requireLogin($reasonMsg= 'exception-nologin-text', $titleMsg= 'exception-nologin')
If the user is not logged in, throws UserNotLoggedIn error.
getUser()
Shortcut to get the User executing this instance.
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.
attemptConfirm($code)
Attempt to confirm the user's email address and show success or failure as needed; if successful...
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set $status
static validateEmail($addr)
Does a string look like an e-mail address?
checkPermissions()
Checks if userCanExecute, and if not throws a PermissionsError.
execute($code)
Main execution point.
submitSend()
Callback for HTMLForm send confirmation mail.
checkReadOnly()
If the wiki is currently in readonly mode, throws a ReadOnlyError.
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 local account incomplete not yet checked for validity & $retval
see documentation in includes Linker php for Linker::makeImageLink & $time
getPageTitle($subpage=false)
Get a self-referential title object.