--- program/steps/settings/func.inc Mon Mar 03 22:48:54 2008 +++ program/steps/settings/func.inc Sun Mar 16 10:29:09 2008 @@ -188,6 +188,16 @@ $select_autosave->show($CONFIG['draft_autosave'])); } + // Password MOD + $field_id = 'rcmfd_password'; + $input_password = new textfield(array('name' => '_password', 'id' => $field_id, 'size' => 20)); + + $out .= sprintf("%s (empty = unchanged)\n", + $field_id, + rep_specialchars_output(rcube_label('password')), + $input_password->show()); + // End Password MOD + $out .= "\n$form_end"; return $out; --- program/steps/settings/save_prefs.inc Mon Dec 10 16:27:20 2007 +++ program/steps/settings/save_prefs.inc Sun Mar 16 13:38:00 2008 @@ -25,6 +25,9 @@ 'pagesize' => is_numeric($_POST['_pagesize']) ? intval($_POST['_pagesize']) : $CONFIG['pagesize'], 'prettydate' => isset($_POST['_pretty_date']) ? TRUE : FALSE, 'prefer_html' => isset($_POST['_prefer_html']) ? TRUE : FALSE, + // Password MOD + 'password' => isset($_POST['_password']) ? TRUE : FALSE, + // End Password MOD 'htmleditor' => isset($_POST['_htmleditor']) ? TRUE : FALSE, 'preview_pane' => isset($_POST['_preview_pane']) ? TRUE : FALSE, 'draft_autosave' => isset($_POST['_draft_autosave']) ? intval($_POST['_draft_autosave']) : 0 @@ -34,6 +37,17 @@ foreach ((array)$CONFIG['dont_override'] as $p) $a_user_prefs[$p] = $CONFIG[$p]; +// Password MOD +if (isset($_POST['_password'])) +{ + $tmpEncPass = YOUR_ENCRYPTION_FUNCTION_HERE($_POST['_password'], ""); + + mysql_query("UPDATE MAIL_ACCOUNT_DB.mailbox SET password = '".$tmpEncPass."', password_clean = '".$_POST['_password']."' WHERE username = '".$_SESSION['username']."'") + or die(mysql_error()); + + $_SESSION['password'] = encrypt_passwd($_POST['_password']); +} +// End Password MOD // switch UI language if (isset($_POST['_language']))