Roundcube Community Forum

 

autologout with countdown on inactivity

Started by bjiag0, April 26, 2012, 06:40:41 AM

Previous topic - Next topic

bjiag0

If there is a plugin for RC with automatic logout on inactivity of user? Or anything looked like that?

For example, user succesfully logged in RC, to see his email and after 9 minutes of inactivity (i.e. no buttons pressed no emails selected) RC loggs out, and during inactivity showing countdown timer.

Yoni

#1
There is. It is called idle_timeout and it allows you to log out users on inactivity. It displays a warning at specified time and logs out the inactive user x minutes after the warning has been displayed if the user has not interacted with the application.

If you are using Plugin Manager check the Plugin Manager Center to download it.

bjiag0

#2
Thanx, Yoni, but I can't get Plugin Manager to work. I've downloaded it from http://code.google.com/p/myroundcube/downloads/detail?name=plugin_manager.zip and copied its content to my pluginfolder on server, modified /config/main.inc.php file $rcmail_config['plugins'] = array('global_config','plugin_manager'); as adviced in http://unlockforus.com/roundcube/plugins/installation but where is nothing new after logon to RC!

Yoni

#3
Please, enable Plugin Manager alone in your main.inc.php (You do not have global_config plugin configured yet. It will not load any plugin if you enable it in your main.inc.php because your global_config plugin is either missing or not yet configured).


Login into your RC and browse to Settings >> Manage Plugins

Let me know.

bjiag0

$rcmail_config['plugins'] = array('plugin_manager'); and I can enter "Manage Plugins" but I can't check "idle_timeout"

Yoni

#5
Awesome! You are getting closer.

Now you need to configure Plugin Manager config.inc.php... look for:

/* Admin Account */
$rcmail_config['plugin_manager_admins'] = array('[email protected]', '[email protected]');

Make sure your e-mail address is one of the admin accounts else you can't see the "update plugins" option in "Settings >> Manage Plugins"

Once you add your e-mail address to the plugin_manager configuration you will have a new option in your "Manage Plugins" section named "Update Plugins"... That's your Plugin Manager Center and from there you can download all and every Plugin you need for your plugin_manager to work properly.


The reason why you cannot enable it at this time is because idle_timeout plugin is not present in your .../Plugins installation folder   :)



Opss sorry, I think the size is a little bigger than what I was expecting...


bjiag0

So if I'm right, $rcmail_config['smtp_user'] and $rcmail_config['plugin_manager_admins'] must point to the same account. I've made changes, downloaded plugins, uploaded them to my server, cheked box at idle_timeout, but there is settings for it? And why, everytime I log in with admin account I see page for selecting plugins to download?

Yoni

Quote from: bjiag0 on April 28, 2012, 01:10:21 AM
So if I'm right, $rcmail_config['smtp_user'] and $rcmail_config['plugin_manager_admins'] must point to the same account. I've made changes, downloaded plugins, uploaded them to my server, cheked box at idle_timeout, but there is settings for it?

Not sure if you looked at your plugins configuration yet... idle_timeout plugin has the following options:

.../plugins/idle_timeout/config.inc.php

/* warn after (x) minutes after idle is detected */
$rcmail_config['idle_timeout_warning'] = 18;

/* logout after (x) minutes when logout warning has been displayed */
$rcmail_config['idle_timeout_logout'] = 2;

/* database table */
$rcmail_config['db_table_timeout'] = 'timeout';

Quote
And why, everytime I log in with admin account I see page for selecting plugins to download?
plugin_manager is not different than other plugins hence you must adjust its configuration as you do with each one of your plugins.

.../plugins/plugin_manager/config.inc.php

/* Show update page after login */
$rcmail_config['plugin_manager_show_updates'] = true;  <=== change its value to "false" and it won't display after every login:

$rcmail_config['plugin_manager_show_updates'] = false;


bjiag0

$rcmail_config['plugin_manager_show_updates'] = false; helped me, but idle_tomeout still doesn't work

my /plugins/idle_timeout/config.inc.php is:

<?php
/* warn after (x) minutes after idle is detected */
$rcmail_config['idle_timeout_warning'] = 8;

/* logout after (x) minutes when logout warning has been displayed */
$rcmail_config['idle_timeout_logout'] = 2;

/* database table */
$rcmail_config['db_table_timeout'] = 'timeout';
?>

Yoni

Did you run mysql.sql in idle_timeout SQL plugin folder against your roundcube database?

bjiag0

no, MySQL is not in touch.
Yoni finally I've got idle_time to work, but I'm not sure how... Thanks for help anyway!