diff options
author | Till Krüss <me@tillkruess.com> | 2013-10-15 18:13:24 +0800 |
---|---|---|
committer | Till Krüss <me@tillkruess.com> | 2013-10-15 18:13:24 +0800 |
commit | 910a3581be47da1d19eb15a68ea6b51c2c31ef67 (patch) | |
tree | f7b166697c70cbd737f7551218a888a055d9269d | |
parent | 0f4c9b850f665f0fdafb00809b4b9f100c59f331 (diff) |
check if password was changed successfully, before looking for error messages
-rw-r--r-- | plugins/password/drivers/domainfactory.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/password/drivers/domainfactory.php b/plugins/password/drivers/domainfactory.php index e253faa49..9128720c9 100644 --- a/plugins/password/drivers/domainfactory.php +++ b/plugins/password/drivers/domainfactory.php @@ -54,7 +54,12 @@ class rcube_domainfactory_password curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); if ($result = curl_exec($ch)) { - // did the new password match the requirements? + // has the password been changed? + if (strpos($result, 'Einstellungen erfolgreich') !== false) { + return PASSWORD_SUCCESS; + } + + // show error message(s) if possible if (strpos($result, '<div class="d-msg-text">') !== false) { preg_match_all('#<div class="d-msg-text">(.*?)</div>#s', $result, $errors); if (isset($errors[1])) { @@ -66,9 +71,6 @@ class rcube_domainfactory_password } } - if (strpos($result, 'Einstellungen erfolgreich') !== false) { - return PASSWORD_SUCCESS; - } } else { return PASSWORD_CONNECT_ERROR; |