Roundcube/Plugin/persistent login: Unterschied zwischen den Versionen

Aus Foxwiki
Die Seite wurde neu angelegt: „== Persistent login == * Home page: <nowiki>https://github.com/mfreiholz/persistent_login</nowiki> * Plugin name: ''persistent_login'' <blockquote>This nice plugin provides a "Keep me logged in" aka "Remember Me" functionality for Roundcube.</blockquote>Unfortunately this is not available via <code>composer</code>. A fork of this on <code>composer</code> actually exists, but it's not updated and it's not working fine here. So let's install it manually…“
 
K Textersetzung - „</blockquote>“ durch „“
Zeile 4: Zeile 4:
* Plugin name: ''persistent_login''
* Plugin name: ''persistent_login''


<blockquote>This nice plugin provides a "Keep me logged in" aka "Remember Me" functionality for Roundcube.</blockquote>Unfortunately this is not available via <code>composer</code>. A fork of this on <code>composer</code> actually exists, but it's not updated and it's not working fine here. So let's install it manually
<blockquote>This nice plugin provides a "Keep me logged in" aka "Remember Me" functionality for Roundcube.Unfortunately this is not available via <code>composer</code>. A fork of this on <code>composer</code> actually exists, but it's not updated and it's not working fine here. So let's install it manually
  wget -O persistent_login-5.3.0.tar.gz <nowiki>https://github.com/mfreiholz/persistent_login/archive/refs/tags/version-5.3.0.tar.gz</nowiki>
  wget -O persistent_login-5.3.0.tar.gz <nowiki>https://github.com/mfreiholz/persistent_login/archive/refs/tags/version-5.3.0.tar.gz</nowiki>
  tar xzf persistent_login-5.3.0.tar.gz
  tar xzf persistent_login-5.3.0.tar.gz

Version vom 27. August 2023, 13:53 Uhr

Persistent login

  • Home page: https://github.com/mfreiholz/persistent_login
  • Plugin name: persistent_login

This nice plugin provides a "Keep me logged in" aka "Remember Me" functionality for Roundcube.Unfortunately this is not available via composer. A fork of this on composer actually exists, but it's not updated and it's not working fine here. So let's install it manually

wget -O persistent_login-5.3.0.tar.gz https://github.com/mfreiholz/persistent_login/archive/refs/tags/version-5.3.0.tar.gz tar xzf persistent_login-5.3.0.tar.gz mv persistent_login-version-5.3.0 persistent_login chown -R apache:apache persistent_login The plugin works better for me with the sql driver, as the cookie driver sometimes disconnects me. So let's enable the sql driver in the config file: cd persistent_login mv config.inc.php.dist config.inc.php Now turn on tokens here in your config file $config['ifpl_use_auth_tokens'] = true; I also renamed the php $rcmail_config variable to $config everywhere, because $rcmail_config is now obsolete in RoundCube.

Finally, if this is a fresh installation of this plugin, we have to create the MySQL table into the roundcube database. The sql code can be found in the sql/mysql.sql file: USE roundcube;

CREATE TABLE IF NOT EXISTS `auth_tokens` ( `token` varchar(128) NOT NULL, `expires` datetime NOT NULL, `user_id` int(10) UNSIGNED NOT NULL, `user_name` varchar(128) NOT NULL, `user_pass` varchar(128) NOT NULL, `host` varchar(255) NOT NULL, PRIMARY KEY (`token`), KEY `user_id_fk_auth_tokens` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `auth_tokens` ADD CONSTRAINT `auth_tokens_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;