summaryrefslogtreecommitdiff
path: root/plugins/password/drivers/sasl.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/password/drivers/sasl.php')
-rw-r--r--plugins/password/drivers/sasl.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/plugins/password/drivers/sasl.php b/plugins/password/drivers/sasl.php
index 361333403..0f762e50d 100644
--- a/plugins/password/drivers/sasl.php
+++ b/plugins/password/drivers/sasl.php
@@ -22,18 +22,20 @@ function password_save($currpass, $newpass)
$username = escapeshellcmd($_SESSION['username']);
if ($fh = popen("$curdir/chgsaslpasswd -p $username", 'w')) {
- fwrite($fh, $newpass."\n");
+ fwrite($fh, $newpass."\n");
$code = pclose($fh);
- if($code == 0)
- return PASSWORD_SUCCESS;
- } else
- raise_error(array(
+ if ($code == 0)
+ return PASSWORD_SUCCESS;
+ }
+ else {
+ raise_error(array(
'code' => 600,
- 'type' => 'php',
- 'file' = __FILE__,
- 'message' => "Password plugin: Unable to execute $curdir/chgsaslpasswd"
- ), true, false);
+ 'type' => 'php',
+ 'file' => __FILE__,
+ 'message' => "Password plugin: Unable to execute $curdir/chgsaslpasswd"
+ ), true, false);
+ }
return PASSWORD_ERROR;
}