diff --git a/html/password.php b/html/password.php
index 901469f3bc8fbc936c93aa59e7ecfd387b6b8d09..26eafb47907296a38f0e2d3f11174649ab8a0b81 100644 (file)
--- a/html/password.php
+++ b/html/password.php
}
/* Check for selected password method */
-$method= "";
+$method= $config->current['HASH'];
if (isset($_GET['method'])){
$method= validate($_GET['method']);
$tmp = new passwordMethod($config);
$message[]= _("Please specify your password!");
} else {
- /* Do we have the selected user somewhere? */
- $ui= ldap_login_user ($uid, $current_password);
- if ($ui == NULL){
- $message[]= _("");
- } else {
- /* Check acl... */
- $ca= get_permissions ($ui->dn, $ui->subtreeACL);
- $ca= get_module_permission($ca, "user", $ui->dn);
- if (chkacl($ca, "password") != ""){
- $message[]= _("You have no permissions to change your password.");
- }
- }
+ /* Do we have the selected user somewhere? */
+ $ui= ldap_login_user ($uid, $current_password);
+ if ($ui == NULL){
+ $message[]= _("Please check the username/password combination.");
+ } else {
+ /* Check acl... */
+ $ca= get_permissions ($ui->dn, $ui->subtreeACL);
+ $ca= get_module_permission($ca, "user", $ui->dn);
+ if (chkacl($ca, "password") != ""){
+ $message[]= _("You have no permissions to change your password.");
+ }
+ }
}
/* Do we need to show error messages? */
/* Displasy SSL mode warning? */
if ($ssl != "" && $config->data['MAIN']['WARNSSL'] == 'true'){
- $smarty->assign ("ssl", "<b>"._("Warning").":<\/b> "._("Session will not be encrypted.")." <a style=\"color:red;\" href=\"$ssl\"><b>"._("Enter SSL session")."<\/b></a>!");
+ $smarty->assign ("ssl", "<b>"._("Warning").":</b> "._("Session will not be encrypted.")." <a style=\"color:red;\" href=\"".htmlentities($ssl)."\"><b>"._("Enter SSL session")."</b></a>!");
} else {
$smarty->assign ("ssl", "");
}
$smarty->assign("php_errors", "");
}
-/* Set focus to the error button if we've an error message */
-$focus= "";
-if (isset($_SESSION['errors']) && $_SESSION['errors'] != ""){
- $focus= '<script language="JavaScript" type="text/javascript">';
- $focus.= 'document.forms[0].error_accept.focus();';
- $focus.= '</script>';
-}
-$smarty->assign("focus", $focus);
-
displayPWchanger();
?>