Browse Source

isdefaultpassword: use method_exists() to check for check_password

Andrew Dolgov 2 years ago
parent
commit
d0cce0c7a4
1 changed files with 4 additions and 1 deletions
  1. 4 1
      classes/pref/prefs.php

+ 4 - 1
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;
 		}