- def delete_user(user)
- # Delete the given username and any records in other tables
- # belonging to it.
- raise NonexistentUserError.new(user) if not user_exists(user)
-
+ # Remove *user* from the Roundcube database. This should remove him
+ # from _every_ table in which he is referenced. Fortunately the
+ # Roundcube developers were nice enough to include DBMS-specific
+ # install and upgrade scripts, so Postgres can take advantage of ON
+ # DELETE triggers.
+ #
+ # @param user [User] the user to remove.
+ #
+ def remove_user(user)
+ raise NonexistentUserError.new(user.to_s()) if not user_exists(user)
+
+ # Get the primary key for this user in the "users" table.