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

Innen: IT documentation
(Új oldal, tartalma: „== Description == Object-oriented style<syntaxhighlight lang="php"> </syntaxhighlight>Procedural style<syntaxhighlight lang="php"> </syntaxhighlight> == Parameters…”)
 
 
(Egy közbenső módosítás ugyanattól a szerkesztőtől nincs mutatva)
1. sor: 1. sor:
== Description ==
== Description ==
Object-oriented style<syntaxhighlight lang="php">
Object-oriented style<syntaxhighlight lang="php">
 
public lnxUser::deleteGroup ( string | int | array $group ): bool
</syntaxhighlight>Procedural style<syntaxhighlight lang="php">
</syntaxhighlight>Procedural style<syntaxhighlight lang="php">
 
lnxDeleteGroup ( string | int | array $group ): bool
</syntaxhighlight>
</syntaxhighlight>


 
Delete a linux group.
== Parameters ==
== Parameters ==


; group
: Group Name or Group ID or an associative array what contains the parameters of deleting group.
: The structure of the the array:
: [
:; 'name' => string
:: Mantandory! Name of linux group.
:; 'force' => bool
:: Optional. If '''true''' delete group even if it is the primary group of a user
: ]


== Return Values ==
== Return Values ==


 
Returns '''true''' if group is deleted, '''false''' otherwise
== Changelog ==
== Changelog ==
{| class="wikitable"
{| class="wikitable"
24. sor: 33. sor:
== Examples ==
== Examples ==
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
$user = 'testUser';
$group = 'testGroup';
$group = 'testGroup';


# Delete linux group
if ( ! lnxDeleteGroup ( $group ) )
print( "Something went wrong during Delete group!" . PHP_EOL );
else
print( "'$group' group is deleted." . PHP_EOL );
</syntaxhighlight>
</syntaxhighlight>
[[Kategória:LnxUser]]
[[Kategória:LnxUser]]

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

Description

Object-oriented style

public lnxUser::deleteGroup ( string | int | array $group ): bool

Procedural style

lnxDeleteGroup ( string | int | array $group ): bool

Delete a linux group.

Parameters

group
Group Name or Group ID or an associative array what contains the parameters of deleting group.
The structure of the the array:
[
'name' => string
Mantandory! Name of linux group.
'force' => bool
Optional. If true delete group even if it is the primary group of a user
]

Return Values

Returns true if group is deleted, false otherwise

Changelog

Version
(lnxUser)
Description
1.00 available

Examples

$group	= 'testGroup';

# Delete linux group

if ( ! lnxDeleteGroup ( $group ) )
	
	print( "Something went wrong during Delete group!" . PHP_EOL );

else
	
	print( "'$group' group is deleted." . PHP_EOL );