Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Create local account for founder (hack)
- $out = exec( "php5 $IP/extensions/CentralAuth/maintenance/createLocalAccount.php " . escapeshellarg( $founderName ) . ' --wiki ' . escapeshellarg( $DBname ) );
- if ( !strpos( $out, 'created' ) ) {
- wfDebugLog( 'CreateWiki', 'Failed to create local account for founder.' );
- return wfMessage( 'createwiki-error-usernotcreated' )->plain();
- }
- require_once( "$IP/includes/UserRightsProxy.php" );
- // Grant founder sysop and bureaucrat rights
- $founderUser = UserRightsProxy::newFromName( $DBname, $founderName );
- $newGroups = array( 'sysop', 'bureaucrat' );
- array_map( array( $founderUser, 'addGroup' ), $newGroups );
- $founderUser->invalidateCache();
- $form->getOutput()->addWikiMsg( 'createwiki-success', $DBname );
- wfDebugLog( 'CreateWiki', 'Successfully created ' . $DBname . ' with a founder of ' . $founderName );
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement