phpbar.de logo

Mailinglisten-Archive

[php] Userauthentication needed

[php] Userauthentication needed

Lars Heuer php_(at)_phpcenter.de
Wed, 2 Oct 2002 11:40:42 +0200


Hallo Thilo,

ich denke, ich habe einen Fehler in meinem Bsp.. Die Definition der
Konstanten m��te wohl in dem Konstruktor erfolgen, vermutlich
akzeptiert PHP die Def. nicht so, wie ich geschrieben, habe, oder?

Also:

--

class MyPerm extends perm {

  function MyPerm() {
    define('PERM_USER',  1);
    define('PERM_EDITOR',   1 | 2);
    define('PERM_ADMIN',    1 | 2 | 4);

    $this->permissions = array(
                                'user'    => PERM_USER,
                                'editor'  => PERM_EDITOR,
                                'admin'   => PERM_ADMIN
                                );
   }
}
--

Gru�,
Lars

-- 
quiXS!          | http://www.quixs.de
utopiXS!        | http://www.utopixs.de    | digitale Postkarten
phpSlash        | http://www.phpslash.org  | das bessere Weblog


php::bar PHP Wiki   -   Listenarchive