Difference between revisions of "Roundcube"

From Organic Design wiki
(delete users)
 
m (Deleting users)
Line 11: Line 11:
 
DELETE FROM users WHERE user_id = 1;
 
DELETE FROM users WHERE user_id = 1;
 
DELETE FROM contactgroupmembers WHERE
 
DELETE FROM contactgroupmembers WHERE
   contactgroup_id IN (SELECT contactgroup_id FROM contactgroups WHERE
+
   contactgroup_id IN (SELECT contactgroup_id FROM contactgroups WHERE user_id = 1);
  user_id = 1;
 
 
</source>
 
</source>

Revision as of 18:13, 18 June 2022

Cone.png This article or section is a stub. Stubs are articles that have not yet received substantial attention from the authors. They are short or insufficient pieces of information and require additions to further increase the article's usefulness. The project values stubs as useful first steps toward complete articles.


Deleting users

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 messages 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);