LnxUser::getGroup
Innen: IT documentation
Description
Object-oriented style
public lnxUser::getGroup ( string | int $group ): array
Procedural style
lnxGetGroup ( string | int $group ): array
Returns informations about the linux group.
Parameters
- group
- Name or Group ID of linux group.
Return Values
Returns an array what contains the information about group, or false if group is not exists.
Structure of array:
[
- 'name' => string
- Name of linux group.
- 'gid' => int
- Group ID of linux group.
- 'members' => array
- It is a simple indexed array what contains the users who is member of this group. Note: Contains the users too to whom this group is primary group!
]
Changelog
| Version (lnxUser) |
Description |
|---|---|
| 1.00 | available |
Examples
$group = 'testGroup';
# Query information about the linux group
print( "Information of '$group' group:" . PHP_EOL );
if ( lnxExistsGroup( $group ) )
foreach ( lnxGetGroup ( $group ) as $key => $value ) {
print( $key . ' : ' );
if ( is_array( $value ) )
print( implode ( ',', $value ) );
else
print( $value );
print( PHP_EOL );
}