Hi all,
I add the changepassword plugin from the link below to my Roundcube
installation:
wheaties.us || Andy and Natasha Wheatley's Blog (http://wheaties.us/blog/2008/12/21/change-password-roundcube/)
I need to logout after user change his password, so he can re-login with
the new one. I want to show an alert popup, and when the user clicks the
"OK" button, it will be redirected to the logout page.
I tried to add this line to the "app.js" file:
case 'save_changepasswd':
if (changepasswd_check_input())
{
this.gui_objects.editform.submit();
---> alert(this.get_label('passwdconfirm')); <---
---> this.switch_task("logout"); <---
}
break;
This actually works only when user inserts old and new password correctly.
But if the user
inserts a wrong old password, the alert popup fires anyway, because this
script is called
before testing submitted values with the db ones.
My questions is: where can I insert the above commands to get the right
behaviour?
Thanks in advance. :)
My way to do that :
echo "";
into save_prefs.inc
greetz
Excuse me, but where I have to write this line?
I try to write it to the end of the file, but without any effect...
Quote from: Top44;17301My way to do that :
echo "";
into save_prefs.inc
greetz
Now works! :D
I modified the suggested line to:
echo "
";
Then I saved it in the save_changepasswd.inc file, in the following position:
if ($updated) {
// $_SESSION['password'] = $RCMAIL->encrypt_passwd($new_pw);
$OUTPUT->show_message('passwordchanged', 'confirmation');
echo "
";
thanks ramo102...wt the link on
wheaties.us || Andy and Natasha Wheatley's Blog (http://wheaties.us/blog/2008/12/21/change-password-roundcube/)
i follow instruction ....& manage to doit at 80% wt "password"tab....bt still can't use it...the problm is...when i click on the "password" tab..nothing happen..:o...it seem no link on taht tab?..
any ideas?..which setting i need to edit more...?..:eek:
ok...now can see the tab after i refresh all the database and my server...when i try to change my password..it's succesfull but when i check on logs this come out...
[28-Apr-2009 08:16:50 +0000] DB Error: MDB2 Error: no such table Query: _doQuery: [Error message: Could not execute statement] [Last executed query: UPDATE database.table SET password_field =ENCRYPT('test7') WHERE user_name = '
[email protected]';] [Native code: 1146] [Native message: Table 'database.table' doesn't exist] in C:\wamp\www\smail\program\include\rcube_mdb2.php on line 539 (POST /SMAIL/?_task=settings&_action=save-password)
the error show that no database exist...:-*
anybody can guide me how to add tables & for this matter..
my mailserver is Hmailsever & mydayabase mysql.
:confused:
tq..
any ideas on this..?.
Check MyRoundCube (see footer). There is a plugin for hMailServer to change the password.
i'm no good on programing site....i saw the footer inside the >myplugins\collection\new_users_stats..trying search the database name...but...:D....lost somewhare!!!...:eek:..try all posible dbase name ...got
[Native message: Table 'roundcubemail' doesn't exist]
do i need to create new table for this?.
:(
Which database application do you use? What is you roundcube database name? How is the roundcube database structure? What is in the error log (./logs/errors)?
database : --> mysql
database name : ---> roundcubemail
structure :-->
error / log :-->
[Native message: Table 'roundcubemail.roundcubemail' doesn't exist]
[4-May-2009 00:05:59 +0000] DB Error: MDB2 Error: no such table Query: _doQuery: [Error message: Could not execute statement] [Last executed query: UPDATE roundcubemail SET password_field =ENCRYPT('a') WHERE user_name = '[email protected]';] [Native code: 1146] [Native message: Table 'roundcubemail.roundcubemail' doesn't exist] in C:\wamp\www\smail\program\include\rcube_mdb2.php on line 539 (POST /smail/?_task=settings&_action=save-password)
:-X0:)
OK, now I see:
// YOU MUST CHANGE THIS QUERY LINE TO MATCH YOUR DATABASE SETTINGS !!!!!
$passwordquery = "UPDATE database.table SET password_field =ENCRYPT('".$new_password."') WHERE user_name = '".$emailuser."';";
The above comment refers to the Database of your IMAP server. You have to adjust it that it finds the username field. There it should update the password field. In addition you have to use there a suitable encryption method. In addition it might be, that you have update other fields in that row too. This depenends on the IMAP server you are using. hMailServer f.e. also needs to update the field where the flag for the encryption method is stored.
So, the answer is:
#1- Check if your IMAP server stores the password in a MySQL database table.
#2- Analyze the table structure and find out the encryption method (lots use md5).
#3- Adjust the query that it fits your IMAP server requirement.
Just to clarify: The query has nothing to do with the roundcube database !!!