Commit 2abd5870 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Delete urlids when deleting users and groups



Bug #1006634, part 1

Ensures that group and user urlids are freed up when users and groups
are deleted.  Not required for views, because view rows are deleted
completely rather than just marked deleted.

Change-Id: Ibcf3549ac5ff1847b5ee528bb98a3b15bd8c4a27
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent 4b0d6f7d
......@@ -743,6 +743,7 @@ function group_delete($groupid, $shortname=null, $institution=null, $notifymembe
'shortname' => null,
'institution' => null,
'category' => null,
'urlid' => null,
),
array(
'id' => $group->id,
......
......@@ -1158,6 +1158,9 @@ function delete_user($userid) {
$deleterec->authinstance = $authinst;
}
// Free the urlid for another user to use
$deleterec->urlid = null;
update_record('usr', $deleterec);
// Remove user from any groups they're in, invited to or want to be in
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment