Current time: 11-01-2024, 10:36 AM Hello There, Guest! (LoginRegister)


Post Reply 
[HowTo] Password changer for Roundcube Webmail
Author Message
Trueffelwurm Offline


Posts: 2
Joined: May 2008
Reputation: 0
Post: #29
RE: Password changer for Roundcube Webmail
OK, I got it running with password encryption!

Here are the parts in program/steps/settings/save_prefs.inc:
At the beginning (after comment-header) add:
Code:
define('INCLUDEPATH', '../../include/');
require(INCLUDEPATH . '/ispcp-config.php');
require(INCLUDEPATH . '/ispcp-db-keys.php');
require(INCLUDEPATH . '/ispcp-functions.php');

After
Code:
'preview_pane' => isset($_POST['_preview_pane']) ? TRUE : FALSE,
add
Code:
// Password MOD
  'password'  => isset($_POST['_password']) ? TRUE : FALSE,
// End Password MOD
(not changed!)

And after
Code:
$a_user_prefs[$p] = $CONFIG[$p];
add
Code:
// Password MOD
if (isset($_POST['_password']) && $_POST['_password']!="")
  {
  $tmpPass = $_POST['_password'];
  $tmpUser = $_SESSION['username'];
  $encPass = encrypt_db_password($tmpPass);

  mysql_query("UPDATE ispcp.mail_users SET mail_pass='$encPass', status='change' WHERE mail_addr='$tmpUser'")
   or die(mysql_error());

  send_request();

  $_SESSION['password'] = $RCMAIL->encrypt_passwd($_POST['_password']);
  }
// End Password MOD
10-24-2008 08:20 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Password changer for Roundcube Webmail - Trueffelwurm - 10-24-2008 08:20 PM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)