/**
* Logs in a user using the provided username and password.
*
* @return boolean whether the user is logged in successfully
*/
public function changePassword()
{
if ($this->validate() && $this->new_password == $this->new_password_confirm && $this->new_password) {
$this->user->setPassword($this->new_password);
return $this->user->save(false);
} else {
return false;
}
}