Source for file auth_plugin.php

Documentation is available at auth_plugin.php

  1. <?php
  2. /**
  3.  * General Authorization script for MOStlyCE plugins (originally written for mosCE).
  4.  * @author $Author: Ryan Demmer (Changed for MOStlyCE by Chad Auld)
  5.  * @version $Id: auth_plugin.php
  6.  * @package MOStlyCE
  7.  * @Portions from remository.php
  8.  */
  9.  
  10. // Don't allow direct linking
  11. defined'_VALID_MOS' or die'Direct Access to this location is not allowed.' );
  12. class authPlugin
  13. {
  14.     function authPlugin()
  15.     {
  16.         $my mamboCore::get('currentUser');
  17.         $this->usertype $my->usertype;
  18.         $this->username $my->username;
  19.         $this->grp $my->gid;
  20.         $this->mainframe mosMainFrame::getInstance();
  21.     }
  22.     function getUserName()
  23.     {
  24.         return $this->username;
  25.     }
  26.     function getUserType()
  27.     {
  28.         return $this->usertype;
  29.     }
  30.     function isAdmin()
  31.     {
  32.         return strtolower$this->usertype == 'superadministrator' || strtolower$this->usertype == 'super administrator' || $this->grp == 16 true false;
  33.     }
  34. }
  35.  
  36. ?>

Documentation generated on Mon, 05 May 2008 16:16:45 +0400 by phpDocumentor 1.4.0