Roundcube Community Forum

Miscellaneous => Roundcube Discussion => Topic started by: andrewjs18 on October 13, 2012, 10:15:30 AM

Title: forgotten password
Post by: andrewjs18 on October 13, 2012, 10:15:30 AM
does roundcube offer a feature for users to change their password if they forgot their original one?

I'm not using any sort of control panel on my web server, so that is why I ask.
Title: Re: forgotten password
Post by: SKaero on October 13, 2012, 03:51:27 PM
There is a plugin for the forgot password functionally https://github.com/saas-dev/roundcube-forgot_password I believe it works in tandem with the password plugin but I'm not 100% positive.
Title: Re: forgotten password
Post by: andrewjs18 on October 13, 2012, 03:59:17 PM
ok, so I suppose I also need to install the password plugin as well?
Title: Re: forgotten password
Post by: SKaero on October 13, 2012, 04:45:33 PM
That would be my guess, I haven't used the plugin so I'm just guessing based off the source code.
Title: Re: forgotten password
Post by: andrewjs18 on October 13, 2012, 05:03:50 PM
great.

I assume this is the password plugin the user is talking about: http://trac.roundcube.net/browser/github/plugins/password
Title: Re: forgotten password
Post by: SKaero on October 13, 2012, 05:38:13 PM
Yes it comes with the standard RoundCube package.
Title: Re: forgotten password
Post by: andrewjs18 on October 15, 2012, 12:50:23 AM
ok.

I feel like a noob, but I've got another question.

it says to copy the config.inc.php.dist to /config/config.inc.php....I already have contents in that php file from another plugin, do I just add the password config stuff below the stuff that's already in there?
Title: Re: forgotten password
Post by: SKaero on October 15, 2012, 01:00:53 AM
The config.inc.php stays in the plugins folder they don't go in the <RC root>/config folder.
Title: Re: forgotten password
Post by: andrewjs18 on October 15, 2012, 01:11:35 AM
really?  because the automatic addressbook plugin says to copy the config.inc.php.dist to */config/config.inc.php, which is what I did and it works fine.

just trying to get clarification here before I embark on getitng it configured so I can then add the forgotten password plugin.
Title: Re: forgotten password
Post by: SKaero on October 15, 2012, 01:19:58 AM
Thats not what it means, its referring to the config folder in the automatic_addressbook. The automatic_addressbook plugin will work without the config.inc.php file it will just be using the default settings.
Title: Re: forgotten password
Post by: andrewjs18 on October 15, 2012, 01:22:11 AM
hmn, that's a bit confusing then, especially since the readme in the automatic addressbook says:

Quote
copy config/config.inc.php.dist to config/config.inc.php
    edit config/config.inc.php as you fancy
Title: Re: forgotten password
Post by: SKaero on October 15, 2012, 01:25:33 AM
Sorry I but didn't write the install file for the automatic addressbook plugin, I just know how RoundCube's config file system works.
Title: Re: forgotten password
Post by: andrewjs18 on October 15, 2012, 01:32:45 AM
ok, thanks.  I moved it to where you said it should be and it still works.

for plugins that are already included with the roundcube package, do we need to fully configure them or is there a button in the roundcube settings somewhere that I can enable it?
Title: Re: forgotten password
Post by: SKaero on October 15, 2012, 02:56:38 AM
You still need to configure the plugins that come with RoundCube.
Title: Re: forgotten password
Post by: andrewjs18 on October 19, 2012, 12:58:54 PM
where do I define the update_passwd function?

it says see main.inc.php.dist, but I'm not finding any information in that file.
Title: Re: forgotten password
Post by: JohnDoh on October 20, 2012, 04:27:06 AM
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.
Title: Re: forgotten password
Post by: andrewjs18 on October 26, 2012, 07:52:12 PM
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:

Code: [Select]
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.
Title: Re: forgotten password
Post by: rosali on October 30, 2012, 04:10:47 AM
Which forgotten password plugin do you use? Please post the download link.
Title: Re: forgotten password
Post by: andrewjs18 on November 04, 2012, 01:54:08 AM
https://github.com/saas-dev/roundcube-forgot_password
Title: Re: forgotten password
Post by: andrewjs18 on November 14, 2012, 02:19:26 AM
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:

Code: [Select]
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>');

});
Title: Re: forgotten password
Post by: SKaero on November 14, 2012, 06:07:38 AM
Change the #taskbar to the identifier where you want the link to show up.
Title: Re: forgotten password
Post by: andrewjs18 on November 14, 2012, 01:10:20 PM
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:

(http://i.imgur.com/n3PBz.jpg)
Title: Re: forgotten password
Post by: andrewjs18 on November 14, 2012, 04:44:14 PM
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?