Revision [528]

This is an old revision of Mod009fAdminUsers made by JsnX on 2004-05-30 13:00:41.

 

Wikka Mod 009

Type: Feature Addition

Credit:

SticK
http://www.twotonllama.com/wiki/?wakka=WakkaAdminHack
and
SilBaer
http://www.wakkawiki.com/PsudoAdminUser


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:
e.g., "admin_users" => "JsnX, HendrikMans, AnotherCoolAdmin",

Modified files:
/wakka.php
actions/footer.php

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;
        }
    }
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki