diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-10-12 00:22:53 +0200 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-10-12 00:22:53 +0200 |
commit | a905043d0897d3b47729d3a6eccf794d542a45aa (patch) | |
tree | c2898b8eddfffaf420000d78e8c141e7315d2d11 /lib/AdminPanel/Shared | |
parent | 6e6caf186efc7e0be848fd542211313871b73e5e (diff) | |
download | colin-keep-a905043d0897d3b47729d3a6eccf794d542a45aa.tar colin-keep-a905043d0897d3b47729d3a6eccf794d542a45aa.tar.gz colin-keep-a905043d0897d3b47729d3a6eccf794d542a45aa.tar.bz2 colin-keep-a905043d0897d3b47729d3a6eccf794d542a45aa.tar.xz colin-keep-a905043d0897d3b47729d3a6eccf794d542a45aa.zip |
Added group name by ID into Shared
Diffstat (limited to 'lib/AdminPanel/Shared')
-rw-r--r-- | lib/AdminPanel/Shared/Users.pm | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/AdminPanel/Shared/Users.pm b/lib/AdminPanel/Shared/Users.pm index 237fee9..9839f8b 100644 --- a/lib/AdminPanel/Shared/Users.pm +++ b/lib/AdminPanel/Shared/Users.pm @@ -573,6 +573,37 @@ sub groupID { return undef; } + +#============================================================= + +=head2 groupName + +=head3 INPUT + +$gid grou identifier + +=head3 OUTPUT + +group name or undef + +=head3 DESCRIPTION + +This method returns the group name for the given group +identifier + +=cut + +#============================================================= +sub groupName { + my ($self, $gid) = @_; + + my $gr = $self->ctx->LookupGroupById($gid); + return $gr->GroupName($self->USER_GetValue) if ($gr); + + return undef; +} + + #============================================================= =head2 addGroup |