isdefaultpassword: use method_exists() to check for check_password

master
Andrew Dolgov 7 years ago
parent 0f05147531
commit d0cce0c7a4

@ -922,7 +922,10 @@ class Pref_Prefs extends Handler_Protected {
static function isdefaultpassword() { static function isdefaultpassword() {
$authenticator = PluginHost::getInstance()->get_plugin($_SESSION["auth_module"]); $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; return true;
} }

Loading…
Cancel
Save