„LnxUser::isMember” változatai közötti eltérés

Innen: IT documentation
(Üres oldal létrehozva)
 
Nincs szerkesztési összefoglaló
 
(Egy közbenső módosítás ugyanattól a szerkesztőtől nincs mutatva)
1. sor: 1. sor:
== Description ==
Object-oriented style<syntaxhighlight lang="php">
public lnxUser::isMember ( string $user, string $group ): bool
</syntaxhighlight>Procedural style<syntaxhighlight lang="php">
lnxIsMember ( string $user, string $group ): bool
</syntaxhighlight>


Determines if a linux user is member of a group.
== Parameters ==
; user
: Name of the linux user
; group
: Name of the linux group
== Return Values ==
Returns '''true''' if the user is member of the group, '''false''' otherwise.
== Changelog ==
{| class="wikitable"
!Version<br>(lnxUser)
!Description
|-
|1.00
|available
|}
== Examples ==
<syntaxhighlight lang="php">
$user = 'testUser';
$group = 'testGroup';
# Examine if user is a member of the group
if ( lnxIsMember( $user, $group ) )
print( "'$user' user is in the '$group' group." . PHP_EOL );
else
print( "'$user' user is not in the '$group' group." . PHP_EOL );
</syntaxhighlight>
[[Kategória:LnxUser]]

A lap jelenlegi, 2021. szeptember 19., 16:18-kori változata

Description

Object-oriented style

public lnxUser::isMember ( string $user, string $group ): bool

Procedural style

lnxIsMember ( string $user, string $group ): bool

Determines if a linux user is member of a group.

Parameters

user
Name of the linux user
group
Name of the linux group

Return Values

Returns true if the user is member of the group, false otherwise.

Changelog

Version
(lnxUser)
Description
1.00 available

Examples

$user	= 'testUser';
$group	= 'testGroup';

# Examine if user is a member of the group

if ( lnxIsMember( $user, $group ) )

	print( "'$user' user is in the '$group' group." . PHP_EOL );

else
	
	print( "'$user' user is not in the '$group' group." . PHP_EOL );