From d0cce0c7a431d886403632ef94add650363d4ef6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 15 Dec 2017 12:15:15 +0300 Subject: [PATCH] isdefaultpassword: use method_exists() to check for check_password --- classes/pref/prefs.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index fca67d0a..fac4b941 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -922,7 +922,10 @@ class Pref_Prefs extends Handler_Protected { static function isdefaultpassword() { $authenticator = PluginHost::getInstance()->get_plugin($_SESSION["auth_module"]); - if ($authenticator && function_exists($authenticator->check_password) && $authenticator->check_password($_SESSION["uid"], "password")) { + if ($authenticator && + method_exists($authenticator, "check_password") && + $authenticator->check_password($_SESSION["uid"], "password")) { + return true; } -- 2.39.5