diff options
author | Andrew Dolgov <[email protected]> | 2021-11-18 07:32:28 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-11-18 07:32:28 +0300 |
commit | 63ec5a89657bb7f9650582b96e0bb255a0889b48 (patch) | |
tree | 074b61eedd7304ba1d8d7deec01d26973ef8e6b8 /classes/auth/base.php | |
parent | 3a3fde1a2e0beac6d179c6449eaad726100710d7 (diff) | |
parent | 2d830c6281c19a7ee29cd379f5aedc82deef3775 (diff) |
Merge branch 'wip-phpstan-level6'
Diffstat (limited to 'classes/auth/base.php')
-rw-r--r-- | classes/auth/base.php | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/classes/auth/base.php b/classes/auth/base.php index 82ea06e1b..d8128400d 100644 --- a/classes/auth/base.php +++ b/classes/auth/base.php @@ -8,13 +8,18 @@ abstract class Auth_Base extends Plugin implements IAuthModule { $this->pdo = Db::pdo(); } - // compatibility wrapper, because of how pluginhost works (hook name == method name) - function hook_auth_user(...$args) { - return $this->authenticate(...$args); + function hook_auth_user($login, $password, $service = '') { + return $this->authenticate($login, $password, $service); } - // Auto-creates specified user if allowed by system configuration - // Can be used instead of find_user_by_login() by external auth modules + /** Auto-creates specified user if allowed by system configuration. + * Can be used instead of find_user_by_login() by external auth modules + * @param string $login + * @param string|false $password + * @return null|int + * @throws Exception + * @throws PDOException + */ function auto_create_user(string $login, $password = false) { if ($login && Config::get(Config::AUTH_AUTO_CREATE)) { $user_id = UserHelper::find_user_by_login($login); @@ -42,7 +47,12 @@ abstract class Auth_Base extends Plugin implements IAuthModule { return UserHelper::find_user_by_login($login); } - // @deprecated + + /** replaced with UserHelper::find_user_by_login() + * @param string $login + * @return null|int + * @deprecated + */ function find_user_by_login(string $login) { return UserHelper::find_user_by_login($login); } |