contributions/usermanagement/model/classes/systemusers.model.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * A fake user class to use as system user 00004 * 00005 * There is no SYSTEM role in DB, since SYSTEM is not a real user. 00006 * Therefore this class is used 00007 * 00008 * @author Gerd Riesselmann 00009 * @ingroup Usermanagement 00010 */ 00011 class DAOSystemUsers extends DAOUsers { 00012 public function __construct() { 00013 parent::__construct(); 00014 $this->email = Config::get_value(Config::MAIL_ADMIN); 00015 } 00016 00017 /** 00018 * Returns status 00019 * 00020 * @return string 00021 */ 00022 public function get_status() { 00023 return Users::STATUS_ACTIVE; 00024 } 00025 00026 /** 00027 * Returns true, if status is active 00028 * 00029 * @return bool 00030 */ 00031 public function is_active() { 00032 return true; 00033 } 00034 00035 /** 00036 * Returns true, if status is unconfirmed 00037 * 00038 * @return bool 00039 */ 00040 public function is_unconfirmed() { 00041 return false; 00042 } 00043 00044 /** 00045 * Returns true, if status is deleted 00046 * 00047 * @return bool 00048 */ 00049 public function is_deleted() { 00050 return false; 00051 } 00052 00053 /** 00054 * Returns true, if status is disabled 00055 * 00056 * @return bool 00057 */ 00058 public function is_disabled() { 00059 return false; 00060 } 00061 00062 // ************************************** 00063 // Access Check Functions 00064 // ************************************** 00065 00066 00067 /** 00068 * Returns array of role names 00069 * 00070 * @return array 00071 */ 00072 public function get_role_names() { 00073 return array(USER_ROLE_SYSTEM => USER_ROLE_SYSTEM); 00074 } 00075 }