„LnxUser::deleteUser” változatai közötti eltérés
Innen: IT documentation
Nincs szerkesztési összefoglaló |
|||
| 9. sor: | 9. sor: | ||
== Parameters == | == Parameters == | ||
; | ; user | ||
: User Name or User ID or an associative array what contains the parameters of deleting user. | : User Name or User ID or an associative array what contains the parameters of deleting user. | ||
:; | : The sructure of the the array: | ||
: [ | |||
:; 'name' => string | |||
:: Mantandory! Name of linux user. | :: Mantandory! Name of linux user. | ||
:; | :; 'remove' => bool | ||
:: Optional. If ''' | :: Optional. If '''true''' remove home directory and mail spool. | ||
:; | :; 'force' => bool | ||
:: Optional. If ''' | :: Optional. If '''true''', force removal of files, even if not owned by user and remove user, even if the user is logged in. | ||
: ] | |||
== Return Values == | == Return Values == | ||
A lap jelenlegi, 2021. szeptember 19., 16:08-kori változata
Description
Object-oriented style
public lnxUser::deleteUser ( string | int | array $user ): bool
Procedural style
lnxDeleteUser ( string | int | array $user ): bool
Delete a linux user.
Parameters
- user
- User Name or User ID or an associative array what contains the parameters of deleting user.
- The sructure of the the array:
- [
- 'name' => string
- Mantandory! Name of linux user.
- 'remove' => bool
- Optional. If true remove home directory and mail spool.
- 'force' => bool
- Optional. If true, force removal of files, even if not owned by user and remove user, even if the user is logged in.
- ]
Return Values
Returns true if user is deleted, false otherwise.
Changelog
| Version (lnxUser) |
Description |
|---|---|
| 1.00 | available |
Examples
$user = 'testUser';
# Delete linux user
if ( ! lnxDeleteUser ( $user ) )
print( "Something went wrong during Delete user!" . PHP_EOL );
else
print( "'$user' user is deleted." . PHP_EOL );