Reset RC settings to default

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Reset RC settings to default

absolutely_free@libero.it

Hi,

is there a way to reset RC settings for some user?

I am using RC 1.1.9 with MySQL backend.

Thank you


_______________________________________________
Roundcube Users mailing list
[hidden email]
http://lists.roundcube.net/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Reset RC settings to default

A.L.E.C
On 10/11/2017 10:50 AM, [hidden email] wrote:
> is there a way to reset RC settings for some user?

UPDATE users SET preferences = NULL WHERE ....

above will reset all settings, but if you want to reset some specific
option you can use bin/moduserprefs.sh script.

--
Aleksander 'A.L.E.C' Machniak
Kolab Groupware Developer         [http://kolab.org]
Roundcube Webmail Developer   [http://roundcube.net]
----------------------------------------------------
PGP: 19359DC1 # Blog: https://kolabian.wordpress.com
_______________________________________________
Roundcube Users mailing list
[hidden email]
http://lists.roundcube.net/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Reset RC settings to default

absolutely_free@libero.it
In reply to this post by absolutely_free@libero.it

Hi,

yes I did. But I don't know pretty much RC internals :)

After next user's login, will his user_id be recreated?

In case, is it necessary to manually modify contacts table to make address book working again for specific user?


Thank you very much

Il 11 ottobre 2017 alle 10.55 Reindl Harald <[hidden email]> ha scritto:

Am 11.10.2017 um 10:50 schrieb [hidden email]:

is there a way to reset RC settings for some user?

I am using RC 1.1.9 with MySQL backend

did you even try to look at the database?
just delete the database record for the user

MariaDB [roundcube_db]> show fields from users;
+----------------------+------------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default
| Extra |
+----------------------+------------------+------+-----+---------------------+----------------+
| user_id | int(10) unsigned | NO | PRI | NULL
| auto_increment |
| username | varchar(128) | NO | MUL | NULL
| |
| mail_host | varchar(128) | NO | | NULL
| |
| created | datetime | NO | | 1000-01-01
00:00:00 | |
| last_login | datetime | YES | | NULL
| |
| language | varchar(5) | YES | | NULL
| |
| preferences | longtext | YES | | NULL
| |
| failed_login | datetime | YES | | NULL
| |
| failed_login_counter | int(10) unsigned | YES | | NULL
| |
+----------------------+------------------+------+-----+---------------------+----------------+
9 rows in set (0.00 sec)

MariaDB [roundcube_db]> select * from users where
username='[hidden email]';
+---------+------------------------+-----------+---------------------+---------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------+
| user_id | username | mail_host | created |
last_login | language | preferences

| failed_login | failed_login_counter |
+---------+------------------------+-----------+---------------------+---------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------+
| 1 | [hidden email] | 127.0.0.1 | 2012-03-03 01:50:57 |
2017-09-24 21:44:54 | de_DE |
a:10:{s:11:"client_hash";s:32:"5b9d50d7dc8b4ffecc3b348d1c96cc04";s:11:"search_mods";a:5:{s:1:"*";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:4:"Sent";a:2:{s:7:"subject";i:1;s:2:"to";i:1;}s:6:"Drafts";a:2:{s:7:"subject";i:1;s:2:"to";i:1;}s:5:"gmail";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:5:"INBOX";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}}s:16:"message_sort_col";s:4:"date";s:18:"message_sort_order";s:4:"DESC";s:9:"list_cols";a:7:{i:0;s:7:"threads";i:1;s:7:"subject";i:2;s:4:"from";i:3;s:4:"date";i:4;s:4:"size";i:5;s:10:"attachment";i:6;s:8:"priority";}s:22:"preview_pane_mark_read";i:5;s:10:"keep_alive";i:60;s:10:"prettydate";b:0;s:9:"junk_mbox";s:4:"junk";s:20:"default_imap_folders";a:5:{i:0;s:5:"INBOX";i:1;s:6:"Drafts";i:2;s:4:"Sent";i:3;s:4:"junk";i:4;s:5:"Trash";}}
| NULL | NULL |
+---------+------------------------+-----------+---------------------+---------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------+
1 row in set (0.00 sec)

MariaDB [roundcube_db]>


_______________________________________________
Roundcube Users mailing list
[hidden email]
http://lists.roundcube.net/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Reset RC settings to default

absolutely_free@libero.it
In reply to this post by A.L.E.C

Ok, thank you very much!

Il 11 ottobre 2017 alle 17.34 "A.L.E.C" <[hidden email]> ha scritto:

On 10/11/2017 10:50 AM, [hidden email] wrote:

is there a way to reset RC settings for some user?

UPDATE users SET preferences = NULL WHERE ....

above will reset all settings, but if you want to reset some specific
option you can use bin/moduserprefs.sh script.

--
Aleksander 'A.L.E.C' Machniak
Kolab Groupware Developer [http://kolab.org]

Roundcube Webmail Developer [http://roundcube.net]

----------------------------------------------------
PGP: 19359DC1 # Blog: https://kolabian.wordpress.com

_______________________________________________
Roundcube Users mailing list
[hidden email]
http://lists.roundcube.net/mailman/listinfo/users


_______________________________________________
Roundcube Users mailing list
[hidden email]
http://lists.roundcube.net/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Reset RC settings to default

absolutely_free@libero.it
In reply to this post by absolutely_free@libero.it

Hi,

in your previous email (about deleting stuff from databases), did you mean:


> delete from users where user username = '[hidden email]';


or only the "preferences" column's content?

Because if I delete the entire row, I will delete user id too, and so it will be "inconsisent" with contacts table. Am I wrong?

thankyou!




Il 11 ottobre 2017 alle 20.27 Reindl Harald <[hidden email]> ha scritto:

Am 11.10.2017 um 20:20 schrieb [hidden email]:

Hi,

yes I did. But I don't know pretty much RC internals :)
After next user's login, will his user_id be recreated?

you are asking the question wrong!

did you need to manually create it?
no

did it got created at login?
since you did not create it manually - yes

Thank you very much

Il 11 ottobre 2017 alle 10.55 Reindl Harald <[hidden email]>
ha scritto:

Am 11.10.2017 um 10:50 schrieb [hidden email]:

is there a way to reset RC settings for some user?

I am using RC 1.1.9 with MySQL backend

did you even try to look at the database?
just delete the database record for the user


_______________________________________________
Roundcube Users mailing list
[hidden email]
http://lists.roundcube.net/mailman/listinfo/users