public function getAttributes() { $ret = parent::getAttributes(); if ($this->isLogged()) { $user = new Pap_Common_User(); $user->setId($this->getPapUserId()); $user->load(); for ($i=1; $i<=25; $i++) { $ret['data'.$i] = $user->get('data'.$i); } $ret[Pap_Db_Table_Users::PARENTUSERID] = $user->getParentUserId(); } return $ret; }
public function getUserFieldValue($code) { if($this->user == null) { throw new Gpf_Exception("You have to set User before getting user fields value!"); } if($code == 'refid') { return $this->user->getRefId(); } else if($code == 'firstname') { return $this->user->getFirstName(); } else if($code == 'lastname') { return $this->user->getLastName(); } else if($code == 'password') { return $this->user->getPassword(); } else if($code == 'username') { return $this->user->getUserName(); } else if($this->isCountryCode($code)){ return $this->getCountryName($this->user->get($code)); } try { return $this->user->get($code); } catch (Gpf_Exception $e) { } return ''; }