Model_Auth_User::save PHP Method

save() public method

Saves the current object. Will hash password if it was changed.
public save ( ) : ORM
return ORM
    public function save()
    {
        if (array_key_exists('password', $this->_changed)) {
            $this->_object['password'] = Auth::instance()->hash_password($this->_object['password']);
        }
        return parent::save();
    }

Usage Example

Example #1
0
 public function save(Validation $validation = NULL)
 {
     if (!$this->loaded()) {
         $this->created = time();
     }
     return parent::save($validation);
 }
All Usage Examples Of Model_Auth_User::save