Skip to content

Commit

Permalink
Merge pull request #170 from Timmy/fix-adduserid
Browse files Browse the repository at this point in the history
Prevent `ulx adduserid` from resetting user allows/denies
  • Loading branch information
zpetty33 committed Jul 15, 2021
2 parents 2c72305 + 7b67567 commit 371a4fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/ulx/modules/sh/user.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ function ulx.adduserid( calling_ply, id, group_name )
if not checkForValidId( calling_ply, id ) then return false end

-- Now add the fool!
ULib.ucl.addUser( id, allows, denies, group_name )
local userInfo = ULib.ucl.users[ id ] or ULib.DEFAULT_GRANT_ACCESS
ULib.ucl.addUser( id, userInfo.allow, userInfo.deny, group_name )

if ULib.ucl.users[ id ] and ULib.ucl.users[ id ].name then
ulx.fancyLogAdmin( calling_ply, "#A added #s to group #s", ULib.ucl.users[ id ].name, group_name )
Expand Down

0 comments on commit 371a4fb

Please sign in to comment.