コード例 #1
0
 /**
  * Store the form's values to this user.
  * @param USER $obj
  * @access private
  */
 protected function _store_to_object($obj)
 {
     if (!$obj->exists()) {
         $obj->set_password($this->value_as_text('password1'));
     }
     if ($this->visible('title')) {
         $obj->title = $this->value_as_text('title');
     }
     $obj->real_first_name = $this->value_as_text('real_first_name');
     $obj->real_last_name = $this->value_as_text('real_last_name');
     $obj->email = $this->value_as_text('email');
     $obj->home_page_url = $this->value_as_text('home_page_url');
     $obj->picture_url = $this->value_as_text('picture_url');
     $obj->icon_url = $this->value_as_text('icon_url');
     $obj->description = $this->value_as_text('description');
     $obj->signature = $this->value_as_text('signature');
     $obj->email_visibility = $this->value_for('email_visibility');
 }
コード例 #2
0
 /**
  * Store the form's values as this user's password.
  * @param USER $obj
  * @access private
  */
 public function commit($obj)
 {
     $history_item = $obj->new_history_item();
     $obj->set_password($this->value_as_text('password1'));
     $obj->store_if_different($history_item);
     $obj->load_permissions();
     if ($this->login->equals($obj)) {
         $this->app->log_in($obj, $this->value_for('remember'));
     }
 }