Skip to content

Commit

Permalink
Types fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed May 9, 2024
1 parent 4a52c66 commit 402b1f6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions galette/lib/Galette/Core/Login.php
Expand Up @@ -182,8 +182,7 @@ public function logIn(string $user, string $passe): bool
'An error occurred: ' . $e->getMessage(),
Analog::WARNING
);
Analog::log($e->getTrace(), Analog::ERROR);
return false;
throw $e;
}
}

Expand Down Expand Up @@ -228,12 +227,12 @@ private function logUser(ArrayObject $row): void
Analog::log('User `' . $row->login_adh . '` logged in.', Analog::INFO);
$this->id = $row->id_adh;
$this->login = $row->login_adh;
$this->admin = $row->bool_admin_adh;
$this->admin = (bool)$row->bool_admin_adh;
$this->name = $row->nom_adh;
$this->surname = $row->prenom_adh;
$this->lang = $row->pref_lang;
$this->i18n->changeLanguage($this->lang);
$this->active = $row->activite_adh;
$this->active = (bool)$row->activite_adh;
$this->logged = true;
if ($row->priorite_statut < Members::NON_STAFF_MEMBERS) {
$this->staff = true;
Expand Down

0 comments on commit 402b1f6

Please sign in to comment.