/** * @param User $user */ public function update(User $user) { $xml = $user->toXml(); $this->service->put("/users/{$user->getUserId()}", $xml); }
/** * @param User $user * @return void */ private function _copy(User $user) { $this->user_id = $user->getUserId(); $this->user_name = $user->getUserName(); $this->first_name = $user->getFirstName(); $this->last_name = $user->getLastLogin(); $this->full_name = $user->getFullName(); $this->email = $user->getEmail(); $this->access_level = $user->getAccessLevel(); $this->disable_messages = $user->getDisableMessages(); $this->active = $user->getActive(); $this->skype = $user->getSkype(); $this->phone_work = $user->getPhoneWork(); $this->phone_mobile = $user->getPhoneMobile(); $this->last_login = $user->getLastLogin(); $this->login_key = $user->getLoginKey(); $this->skip_first_login = $user->getSkipFirstLogin(); $this->courses = new UserCourses($this->service, $this); }