Wiki source for Mod009fAdminUsers

Show raw source

==== Wikka Mod 009 ====
Type: Feature Addition
**[[ | SticK]] **
""WakkaAdminHack"" //Warning: don't go to original site or follow links on ""SticK""'s page: infected!//
** [[ | SilBaer]] **
[[ | PsudoAdminUser @ WakkaWiki]]

Added the ability to have admin users. Admin users can override things such as the ACL lists and have the ability to delete pages and comments.

Instructions to add admin users:
- Edit the wakka.config.php file.
- Modify the admin_users line, adding additional Wiki Names between the quotes, separated by commas....
e.g., "admin_users" => """JsnX, HendrikMans, AnotherCoolAdmin""",

Modified files:

There is a bug in Stick's instructions. The admin user list is not trimmed correctly. Modified the function to read as follows.....

//returns true if user is listed in configuration list as admin
function IsAdmin() {
$adminstring = $this->config["admin_users"];
$adminarray = explode(',' , $adminstring);

foreach ($adminarray as $admin) {
if (trim($admin) == $this->GetUserName()) return true;
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki