/** * get user instance which last updated database entry of metafolder * the updater can be changed * * @return NULL|\vxPHP\User\User */ public function getUpdatedBy() { if (is_null($this->updatedBy)) { // no user was stored with instance if (empty($this->data['updatedBy'])) { return NULL; } else { $this->updatedBy = new User(); $this->updatedBy->setUser($this->data['updatedBy']); } } return $this->updatedBy; }
public function __construct() { parent::__construct(); }
public function canPayLater(UserAbstract $user) { // Permitted user roles are defined in the shop content page $roles = explode(',', page('shop')->paylater()); if ($user and in_array($user->role(), $roles)) { return true; } return false; }
/** * Set the user properties from an array * * @param array $properties An associative array * @return User */ public function setProperties($properties) { parent::setProperties($properties); //Set the user data $this->getSession()->set('user', ObjectConfig::unbox($properties)); return $this; }
/** * Set the user data from an array * * @param array $data An associative array of data * @return User */ public function values(array $data) { parent::values($data); //Set the user data $this->getSession()->set('user', ObjectConfig::unbox($data)); return $this; }