mirror of
https://github.com/Oreolek/ticketauth.git
synced 2024-05-17 00:18:24 +03:00
log in as anyone
This commit is contained in:
parent
691fab4bcc
commit
62e45d2dea
10
README.md
10
README.md
|
@ -1,3 +1,13 @@
|
|||
# Ticket Authentication
|
||||
|
||||
See [here](https://www.mediawiki.org/wiki/Extension:Ticket_Authentication).
|
||||
|
||||
## CHANGES
|
||||
|
||||
By default TicketAuth creates new users and logs you in as a new user.
|
||||
To allow anyone to login under any user, so you could create ticket URLs for an existing user, add this to your
|
||||
LocalSettings:
|
||||
|
||||
```
|
||||
$wgTktAuth_AllowLoginAll = TRUE;
|
||||
```
|
||||
|
|
|
@ -21,7 +21,7 @@ $wgTktAuth_TicketExpiryMinutes = 10;
|
|||
$wgTktAuth_AllowPasswordChange = true;
|
||||
// Path to this file, relative to MediaWiki installation
|
||||
require_once("$IP/extensions/TicketAuth/TicketAuth.php");
|
||||
*/
|
||||
*/
|
||||
|
||||
/*
|
||||
Ticket format:
|
||||
|
@ -32,7 +32,7 @@ http://mywiki.com/w/index.php/Main_Page
|
|||
&email=simon%40example.org
|
||||
&time=1389005243
|
||||
&sign=4522098027f3af0e4e19340c84224ed6
|
||||
*/
|
||||
*/
|
||||
|
||||
|
||||
$wgExtensionCredits['other'][] = array (
|
||||
|
@ -158,12 +158,14 @@ function efTktAuth_OnUserLoadFromSession ( $user, &$result )
|
|||
$user->addNewUserLogEntry( 'autocreate', 'TicketAuth' );
|
||||
} else {
|
||||
wfDebug( "TicketAuth: Logging user in.\n" );
|
||||
if ( !isset( $GLOBALS['wgTktAuth_AllowLoginAll'] ) || $GLOBALS['wgTktAuth_AllowLoginAll'] === false ) {
|
||||
if ( !$user->getBoolOption( 'TicketAuth' ) ) {
|
||||
$error = 'TicketAuth: User\'s account with this login name already exists and ' .
|
||||
'it was not created by TicketAuth. Can\'t authenticate.';
|
||||
wfDebug( $error . "\n" );
|
||||
die( $error );
|
||||
}
|
||||
}
|
||||
if ( $realName != '' ) {
|
||||
$user->setRealName( $realName );
|
||||
}
|
||||
|
@ -209,7 +211,7 @@ function efTktAuth_OnPrefsPasswordAudit ( $user, $newPass, $error )
|
|||
? wfMsg( 'resetpass_forbidden' )
|
||||
: wfMessage( 'resetpass_forbidden' )->text()
|
||||
) . ' <Extension:Ticket Authentication>'
|
||||
);
|
||||
);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue