ispCP - Board - Support - VHCS fork

Full Version: Password changer for Roundcube Webmail
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
das letzte release vor der alpha.
I have promised to update the howto, when the beta is released - that's the case now. But because I was absent here for some weeks, I have to get up to date first. I already have read something about changes in the database and the mail passwords, so I have to check this first.
Have you updatet the Howto for the beta, which is shipped out since 21.09.08?
Not yet. Sorry, but I have no time at the moment and I suppose that it is not that easy to update it this time, because of the database changes in ispCP.
modify
Code:
// Password MOD
if (isset($_POST['_password']) && $_POST['_password']!="")
  {
  $tmpPass = $_POST['_password'];
  $tmpUser = $_SESSION['username'];

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

  send_request();

  $_SESSION['password'] = encrypt_passwd($_POST['_password']);
  }
// End Password MOD
in
Code:
// Password MOD
if (isset($_POST['_password']) && $_POST['_password']!="")
  {
  $tmpPass = $_POST['_password'];
  $tmpUser = $_SESSION['username'];

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

  send_request();

  $_SESSION['password'] = encrypt_passwd($_POST['_password']);
  }
// End Password MOD
did not tested but it should work.
you mean Database Changes in Trunk right? Cause of mailuserpasswordencryption.
Quote:you mean Database Changes in Trunk right? Cause of mailuserpasswordencryption.
Exactly.

Thanks sci2tech. I will test it.
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
Pages: 1 2 3
Reference URL's