Difference between revisions of "Roundcube"
From Organic Design wiki
(→Deleting users: official script) |
(→Deleting users: comment last) |
||
Line 5: | Line 5: | ||
Deleting is done by user ID which is found in the ''users'' table, you can then delete the user as follows. In the following example we're using ID 1, you can also use the ''IN (ID,ID,ID...)'' syntax to deal with multiple at once. | Deleting is done by user ID which is found in the ''users'' table, you can then delete the user as follows. In the following example we're using ID 1, you can also use the ''IN (ID,ID,ID...)'' syntax to deal with multiple at once. | ||
− | <source lang=" | + | <source lang="mysql"> |
DELETE FROM cache WHERE user_id = 1; | DELETE FROM cache WHERE user_id = 1; | ||
DELETE FROM contactgroups WHERE user_id = 1; | DELETE FROM contactgroups WHERE user_id = 1; | ||
DELETE FROM contacts WHERE user_id = 1; | DELETE FROM contacts WHERE user_id = 1; | ||
DELETE FROM identities WHERE user_id = 1; | DELETE FROM identities WHERE user_id = 1; | ||
− | |||
DELETE FROM users WHERE user_id = 1; | DELETE FROM users WHERE user_id = 1; | ||
− | DELETE FROM contactgroupmembers WHERE contactgroup_id IN (SELECT contactgroup_id FROM contactgroups WHERE user_id = 1); | + | ; DELETE FROM contactgroupmembers WHERE contactgroup_id IN (SELECT contactgroup_id FROM contactgroups WHERE user_id = 1); |
</source> | </source> | ||
+ | The last one is commented because we don't need it for OD, but some instances may need it |
Revision as of 19:34, 18 June 2022
Deleting users
There's a script for deleting users, if that fails, here's the manual way.
Deleting is done by user ID which is found in the users table, you can then delete the user as follows. In the following example we're using ID 1, you can also use the IN (ID,ID,ID...) syntax to deal with multiple at once.
DELETE FROM cache WHERE user_id = 1;
DELETE FROM contactgroups WHERE user_id = 1;
DELETE FROM contacts WHERE user_id = 1;
DELETE FROM identities WHERE user_id = 1;
DELETE FROM users WHERE user_id = 1;
; DELETE FROM contactgroupmembers WHERE contactgroup_id IN (SELECT contactgroup_id FROM contactgroups WHERE user_id = 1);
The last one is commented because we don't need it for OD, but some instances may need it