/** * Save the user information. * * @param array $post */ public function save(array $post) { $avatar = Avatar::factory($this->user, array('driver' => $post['avatar-type'])); $this->user->set_property('avatar', $avatar->data($post)); $this->user->set_property('about', Security::xss_clean(Arr::get($post, 'about'))); $this->user->set_property('signature', Security::xss_clean(Arr::get($post, 'signature'))); $this->user->update(); // Save cached_properties. }
/** * Get the users avatar class. * * @return Avatar */ public function avatar() { return Avatar::factory($this, $this->get_property('avatar', array())); }