Skip to content

Instantly share code, notes, and snippets.

@bohwaz
Last active December 22, 2021 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bohwaz/8c34cc4da084ff188c33f29ba9d6d091 to your computer and use it in GitHub Desktop.
Save bohwaz/8c34cc4da084ff188c33f29ba9d6d091 to your computer and use it in GitHub Desktop.
Index: src/include/lib/Garradin/Membres/Session.php
==================================================================
--- src/include/lib/Garradin/Membres/Session.php
+++ src/include/lib/Garradin/Membres/Session.php
@@ -157,10 +157,21 @@
protected function deleteAllRememberMeSelectors($user_id)
{
return $this->db->delete('membres_sessions', $this->db->where('id_membre', $user_id));
}
+
+ public function login(string $login, string $password, bool $remember_me = false): bool
+ {
+ $return = null;
+ $session = $this;
+ if (Plugin::fireSignal('user.login', compact('user', 'password', 'remember_me', 'session'), $return)) {
+ return $return;
+ }
+
+ return parent::login($login, $password, $remember_me);
+ }
// Ajout de la gestion de LOCAL_LOGIN
public function isLogged(bool $disable_local_login = false)
{
$logged = parent::isLogged();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment