Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>After some hacking here is the complete solution. I did not find it anywhere this complete so please give it a thumbs up if it is useful to you:</p> <p>Customize the ouput of the login screen by putting the following changes into LocalSettings.php</p> <pre><code>$wgHooks['UserLoginForm'][] = 'lfChangeLoginPage'; function lfChangeLoginPage( &amp;$template ) { $template-&gt;set('canreset',false); // removes default reset password link $template-&gt;set('resetlink',false); // Use the following line to show your own 'reset password' link above the login fields $template-&gt;set('link',"&lt;a href='http://www.somedomain.org/lostpassword'&gt;Forgot your password?&lt;/a&gt;"); return true; } </code></pre> <p>Disable the reset password page just in case someone knows the direct URL:</p> <pre><code>// Disallow password reset on password reset page $wgHooks['UserLoginMailPassword'][] = 'MailPasswordIsAllowed'; function MailPasswordIsAllowed ( $username, $error ) { $error = wfMsg( 'resetpass_forbidden' ); return false; } </code></pre> <p>Disallow password change on password change page (referred by link in user preferences):</p> <pre><code>$wgHooks['PrefsPasswordAudit'][] = 'ChangePasswordIsAllowed'; function ChangePasswordIsAllowed ( $user ) { throw new PasswordError( wfMsg( 'resetpass_forbidden' )); return true; } </code></pre> <p>Hide password change link in user preferences:</p> <pre><code>$wgHooks['GetPreferences'][] = 'RemovePasswordChangeLink'; function RemovePasswordChangeLink ( $user, &amp;$preferences ) { unset($preferences['password']); return true; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload