Group Rename Hook

This commit is contained in:
Andreblue 2017-02-17 14:35:37 -05:00
parent b0255ec856
commit c7c5e72cf5
2 changed files with 18 additions and 1 deletions

View File

@ -473,7 +473,7 @@ function ucl.renameGroup( orig, new )
ucl.saveUsers()
ucl.saveGroups()
hook.Call( ULib.HOOK_UCLCHANGED )
hook.Call( ULib.HOOK_GROUP_RENAMED, _, orig, new )
-- CAMI logic
if not ULib.findInTable( {"superadmin", "admin", "user"}, orig ) then

View File

@ -358,6 +358,23 @@ ULib.HOOK_GROUP_REMOVED = "ULibGroupRemoved"
]]
ULib.HOOK_GROUP_ACCESS_CHANGE = "ULibGroupAccessChanged"
--[[
Hook: renameGroup
Called during ULib.ucl.groupAllow.
This alerts you to the group being created.
Parameters passed to callback:
old_name - Old Group Name
new_name - New Group Name
Revisions:
v2.ANDRE_DO_UPDATE - Initial
]]
ULib.HOOK_GROUP_RENAMED = "ULibGroupRenamed"
--[[
Section: UCL Helpers