public function authenticate($credentials = NULL) { $user_auth = User::authenticate($credentials['username'], $credentials['password']); if ($user_auth instanceof User) { $this->setUser($user_auth); return true; } else { return false; } }
public function authenticate($credentials = NULL) { $user_auth = User::authenticate($credentials['username'], $credentials['password']); if ($user_auth instanceof User) { $this->setUser($user_auth); return true; } else { \DF\Flash::addMessage('Could not authenticate your credentials!', 'red'); return false; } }