Roundcube Community Forum

 

forgotten password

Started by andrewjs18, October 13, 2012, 10:15:30 AM

Previous topic - Next topic

JohnDoh

i guess you mean in the password plugin. that is just an example. for the password_query config optoin you need to set what ever SQL statement is needed to update a user's password in your users database.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

andrewjs18

ok, so I got the password plugin working and the forgotten password plugin is also installed and partially working as well.

how do I add a forgotten password link to the main roundcube login page beside the 'login' button?  in the readme with the forgotten password plugin, it says to activate the taskbar plugin, but I can't find that plugin in the repository.  it then says that you could also modify the js/forgot_password.js file to append the link.  I'm not too familiar with what needs to be changed.  Here's the file in question:


function forgot_password(){
  if($('#rcmloginuser').val())
{
  document.location.href = "./?_task=settings&_action=plugin.forgot_password_reset&_username=" + escape($('#rcmloginuser').val());
}
else
{
  rcmail.display_message(rcmail.gettext('forgot_passworduserempty','forgot_password'),'error');
}
}

$(document).ready(function($){

  $('#taskbar').append('<a class="home" id="forgot_password" href="javascript:forgot_password();">' + rcmail.gettext('forgotpassword','forgot_password') + '</a>');

});


any help is appreciated.

rosali

Which forgotten password plugin do you use? Please post the download link.
Regards,
Rosali


andrewjs18

bump.  does anyone know how to get the forgotten password link to show up on the main roundcube login page?

the readme for the plugin says to modify the js/forgot_password.js file if you're not using the taskbar plugin (which I'm not at this time).

here's the code of that .js file:


function forgot_password(){
  if($('#rcmloginuser').val())
{
  document.location.href = "./?_task=settings&_action=plugin.forgot_password_reset&_username=" + escape($('#rcmloginuser').val());
}
else
{
  rcmail.display_message(rcmail.gettext('forgot_passworduserempty','forgot_password'),'error');
}
}

$(document).ready(function($){

  $('#taskbar').append('<a class="home" id="forgot_password" href="javascript:forgot_password();">' + rcmail.gettext('forgotpassword','forgot_password') + '</a>');

});

SKaero

Change the #taskbar to the identifier where you want the link to show up.

andrewjs18

Quote from: SKaero on November 14, 2012, 06:07:38 AM
Change the #taskbar to the identifier where you want the link to show up.

that's the thing, I don't know what identifier it is.

I'm trying to place the link to the right of the login button on this page:


andrewjs18

ok, I got the plugin to append the link on the login page - not where I want it to be at, but it's there - and tested it.  it doesn't appear to work properly as it sends blank emails to the secondary email account listed in the settings.

do you know if there's a better, more updated, forgotten password plugin, skaero?