From 51d2deeea911e84ea2e56b78544445de22f881b9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 8 Feb 2021 19:11:31 +0300 Subject: fix hierarchy of authentication modules, make everything extend Auth_Base and implement hook_auth_user() for pluginhost --- classes/auth/base.php | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'classes/auth') diff --git a/classes/auth/base.php b/classes/auth/base.php index 4cbc23589..1b9015fe3 100644 --- a/classes/auth/base.php +++ b/classes/auth/base.php @@ -1,6 +1,6 @@ pdo = Db::pdo(); } - /** - * @SuppressWarnings(unused) - */ - function check_password($owner_uid, $password, $service = '') { - return false; - } - - /** - * @SuppressWarnings(unused) - */ - function authenticate($login, $password, $service = '') { - return false; + // compatibility wrapper, because of how pluginhost works (hook name == method name) + function hook_auth_user(...$args) { + return $this->authenticate(...$args); } // Auto-creates specified user if allowed by system configuration -- cgit v1.2.3