/** Get the user role * @access public */ public function getRole() { $user = new Pas_User_Details(); if ($user->getPerson()) { $role = $user->getPerson()->role; } else { $role = NULL; } return $role; }
/** Work out who created the error * @access public * @return string */ public function whois() { $user = new Pas_User_Details(); if (is_null($user->getPerson())) { $string = 'Public user'; } else { $name = $user->getPerson()->fullname; $account = $user->getPerson()->username; $string = $name . ' with the account username of ' . $account; } return $string; }
/** Get the role of the user * @access public * @return string */ public function getRole() { $user = new Pas_User_Details(); $person = $user->getPerson(); if ($person) { $this->_role = $person->role; } return $this->_role; }
/** Construct the class * @access public * @return string|Pas_Exception */ public function __construct() { $person = new Pas_User_Details(); if ($person) { $this->_inst = $person->getPerson()->institution; } else { throw new Pas_Exception('No user credentials found'); } }
/** Get the user role * @access public * @return string $_role; */ public function getRole() { $person = new Pas_User_Details(); $details = $person->getPerson(); if ($details) { $this->_role = $details->role; } return $this->_role; }
/** Get the identity of user * @access public * @return integer * @throws Zend_Exception */ protected function _getIdentity() { $user = new Pas_User_Details(); $person = $user->getPerson(); if ($person) { return $person->id; } else { throw new Zend_Exception('No user credentials found', 500); } }
/** Get the user account * @access protected * @return string * @throws Pas_Exception */ protected function _getAccount() { $user = new Pas_User_Details(); $person = $user->getPerson(); if ($person) { return $person->institution; } else { throw new Pas_Exception('User credentials missing', 500); } }
/** Get the role of the user * @access public * @return string */ public function getRole() { $user = new Pas_User_Details(); $person = $user->getPerson(); if ($person) { return $person->role; } else { return 'public'; } }
/** Construct the user object * */ public function __construct() { $user = new Pas_User_Details(); $this->_user = $user->getPerson(); if ($this->_user) { $this->_role = $this->_user->role; } else { $this->_role = 'public'; } }
/** Get the role of the user * @access protected * @return mixed */ protected function getRole() { $user = new Pas_User_Details(); $person = $user->getPerson(); if ($person) { return $person->role; } else { return null; } }
/** The form constructor * @access public */ public function __construct() { $this->addPrefixPath('Pas_Form_Element', 'Pas/Form/Element', 'element'); $this->addElementPrefixPath('Pas_Filter', 'Pas/Filter/', 'filter'); $this->addElementPrefixPath('Pas_Validate', 'Pas/Validate/', 'validate'); $this->setAttrib('class', 'form-horizontal'); $this->setAttrib('accept-charset', 'UTF-8'); $this->clearDecorators(); $person = new Pas_User_Details(); $details = $person->getPerson(); if ($details) { $this->_role = $details->role; } else { $this->_role = 'public'; } parent::__construct(); }
/** Get the user's role * @access protected * @return string */ protected function _getRole() { $role = new Pas_User_Details(); return $role->getPerson()->role; }
/** Construct the form * @access public */ public function __construct() { $this->addPrefixPath('Pas_Form_Element', 'Pas/Form/Element', 'element'); $this->addElementPrefixPath('Pas_Filter', 'Pas/Filter/', 'filter'); $this->addElementPrefixPath('Pas_Validate', 'Pas/Validate/', 'validate'); $this->setAttrib('class', 'form-horizontal'); $this->setAttrib('accept-charset', 'UTF-8'); $this->clearDecorators(); $this->_view = Zend_Layout::getMvcInstance()->getView(); $this->_view->jQuery()->addJavascriptFile($this->_view->baseUrl() . '/js/select2.min.js', $type = 'text/javascript'); $this->_view->jQuery()->addJavascriptFile($this->_view->baseUrl() . '/js/selectPrettify.js', $type = 'text/javascript'); $this->_view->headLink()->appendStylesheet($this->_view->baseUrl() . '/css/select2.css', $type = 'screen'); $this->_view->headLink()->appendStylesheet($this->_view->baseUrl() . '/css/bootstrap-multiselect.css', $type = 'screen'); $person = new Pas_User_Details(); $details = $person->getPerson(); if ($details) { $this->_role = $details->role; } else { $this->_role = 'public'; } parent::__construct(); }
public function __construct() { $user = new Pas_User_Details(); $this->_user = $user->getPerson(); $this->_dateTime = Zend_Date::now()->toString('yyyyMMddHHmmss'); $backendOptions = array('cache_dir' => APPLICATION_PATH . '/tmp'); $this->_memory = Zend_Memory::factory('File', $backendOptions); $params = Zend_Controller_Front::getInstance()->getRequest()->getParams(); $this->_params = $this->_cleanParams($params); $this->_search = new Pas_Solr_Handler(); }
public function getUser() { $user = new Pas_User_Details(); if ($user) { $this->_user = $user->getPerson(); } else { throw new Pas_Exception('No user credentials found', 500); } return $this->_user; }
/** Get the person logged in * @return string */ public function getPerson() { $user = new Pas_User_Details(); return $user->getPerson(); }
/** Construct the object * @access public * @param array $fields */ public function __construct($fields) { $this->_fields = $fields; $user = new Pas_User_Details(); $this->_role = $user->getPerson()->role; }
/** Get the current user to check * @access public * @return object */ public function getUser() { $person = new Pas_User_Details(); return $person->getPerson(); }
/** Get the user's details * @access public * @return string */ public function getUser() { $user = new Pas_User_Details(); return $user->getPerson()->fullname; }