summaryrefslogtreecommitdiff
path: root/classes/Pref_Prefs.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/Pref_Prefs.php')
-rw-r--r--classes/Pref_Prefs.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/classes/Pref_Prefs.php b/classes/Pref_Prefs.php
index 5aa2382dd..c9eb89631 100644
--- a/classes/Pref_Prefs.php
+++ b/classes/Pref_Prefs.php
@@ -174,7 +174,8 @@ class Pref_Prefs extends Handler_Protected {
$authenticator = PluginHost::getInstance()->get_plugin($_SESSION["auth_module"]);
- if (method_exists($authenticator, "change_password")) {
+ if (implements_interface($authenticator, "IAuthModule2")) {
+ /** @var IAuthModule2 $authenticator */
print format_notice($authenticator->change_password($_SESSION["uid"], $old_pw, $new_pw));
} else {
print "ERROR: ".format_error("Function not supported by authentication module.");
@@ -325,9 +326,7 @@ class Pref_Prefs extends Handler_Protected {
$authenticator = false;
}
- $otp_enabled = UserHelper::is_otp_enabled($_SESSION["uid"]);
-
- if ($authenticator && method_exists($authenticator, "change_password")) {
+ if ($authenticator && implements_interface($authenticator, "IAuthModule2")) {
?>
<div style='display : none' id='pwd_change_infobox'></div>