org.seanmonahan
[ class tree: org.seanmonahan ] [ index: org.seanmonahan ] [ all elements ]

Class: MediaWikiManager

Source Location: /MediaWikiManager.php

Class Overview


This script allows for the external management of MediaWiki user accounts.


Author(s):

  • Sean Monahan

Version:

  • 1.0

Copyright:

  • 2008 Sean Monahan

Constants

Methods



Class Details

[line 16]
This script allows for the external management of MediaWiki user accounts.

PHP Version 5

LICENSE: This source file is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License. http://creativecommons.org/licenses/by-sa/3.0/us/




Tags:

author:  Sean Monahan
version:  1.0
copyright:  2008 Sean Monahan


[ Top ]


Class Methods


method CreateUser [line 74]

int CreateUser( string $firstname, string $lastname, string $username, string $email, string $password)

Creates a user account for the MediWiki.

User Manual accounts use the same credentials as our CMS.




Tags:

return:  The MediaWiki user ID.
access:  public


Parameters:

string   $firstname   The user's first name.
string   $lastname   The user's last name.
string   $username   The user's last name.
string   $email   The user's email address.
string   $password   The user's password.

[ Top ]

constructor __construct [line 57]

MediaWikiManager __construct( )

Class constructor.



Tags:

access:  public


[ Top ]

method DisableUserById [line 350]

void DisableUserById( int $uid, bool 1)

Disables the specified account ID.

MediaWiki user accounts CANNOT be deleted. Doing so severly messes up the wiki as the entire system is relational. Instead account are simply disabled by assigning the account in question a gibberish password.

NOTE: this is a fully automated process and the password is not saved anywhere save the DB. In other words: when an account is disabled it's password cannot be recovered. To get a new password, one will have to be generated in Admin.




Tags:

access:  public


Parameters:

int   $uid   The user ID for the account to be disabled.
bool   1   True on success.

[ Top ]

method DisableUserByName [line 312]

void DisableUserByName( string $username, bool 1)

Disables the specified account.

MediaWiki user accounts CANNOT be deleted. Doing so severly messes up the wiki as the entire system is relational. Instead account are simply disabled by assigning the account in question a gibberish password.

NOTE: this is a fully automated process and the password is not saved anywhere save the DB. In other words: when an account is disabled it's password cannot be recovered. To get a new password, one will have to be generated in Admin.




Tags:

access:  public


Parameters:

string   $username   The user name for the account to be disabled.
bool   1   True on success.

[ Top ]

method UpdatePasswordById [line 278]

bool UpdatePasswordById( int $uid, string $password)

Updates the password for the given account ID.



Tags:

return:  
  1. True
on success.
access:  public


Parameters:

int   $uid   The account we want to update.
string   $password   The new password.

[ Top ]

method UpdatePasswordByName [line 249]

bool UpdatePasswordByName( string $username, string $password)

Updates the password for the given account user name.



Tags:

return:  
  1. True
on success.
access:  public


Parameters:

string   $username   The account we want to update.
string   $password   The new password.

[ Top ]

method UpdateUser [line 207]

bool UpdateUser( string $firstname, string $lastname, string $username, string $email, [string $password = null], [int $uid = null])

Updates a user account in MediaWiki



Tags:

return:  True on success.
access:  public


Parameters:

string   $firstname   The user's first name.
string   $lastname   The user's last name.
string   $username   The user's last name.
string   $email   The user's email address.
string   $password   The user's password.
int   $uid   The user's MediaWiki ID.

[ Top ]


Class Constants

DBHOST =  "YourDatabaseHostHere"

[line 37]

The database host for MediaWiki.


[ Top ]

DBNAME =  "YourDatabaseNameHere"

[line 44]

The database name for MediaWiki.


[ Top ]

DBPASS =  "YourDatabasePasswordHere"

[line 23]

The MediaWiki database password.


[ Top ]

DBUSER =  "YourDatabaseUserHere"

[line 30]

The MediaWiki database user.


[ Top ]



Documentation generated on Mon, 15 Dec 2008 21:14:25 -0700 by phpDocumentor 1.4.1