„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…”) |
Nincs szerkesztési összefoglaló |
||
| 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 == | ||
; <code>group</code> | |||
: Group Name or Group ID or an associative array what contains the parameters of deleting group. Structure of the array: [ | |||
:; <code>'name'</code> => string | |||
:: Mantandory! Name of linux group. | |||
:; <code>'force'</code> => bool | |||
:: Optional. If '''<code>true</code>''' 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: | 30. sor: | ||
== Examples == | == Examples == | ||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
$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 2021. szeptember 19., 16:10-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. Structure of the array: [
'name'=> string- Mantandory! Name of linux group.
'force'=> bool- Optional. If
truedelete 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 );