Exemplo n.º 1
0
 private function _uploadAvatar($idAvatar)
 {
     if ($idAvatar != 0) {
         $avatar = RM_Photo::getById($idAvatar);
         $this->_profile->setAvatar($avatar);
     }
 }
Exemplo n.º 2
0
 private function _setData(stdClass $data)
 {
     $this->_entity->setEmail($data->email);
     if (!empty($data->passwd)) {
         $this->_entity->setPassword($data->passwd);
     }
     if (isset($data->id_avatar) && intval($data->id_avatar) !== 0) {
         $photo = RM_Photo::getById($data->id_avatar);
         if ($photo instanceof RM_Photo) {
             $this->_entity->setAvatar($photo);
         }
     }
     $this->_entity->setName($data->user_name);
     $this->_entity->setLastname($data->last_name);
     $this->_entity->setPhone($data->phone);
 }