LnxUser::authUser
Innen: IT documentation
Description
Object-oriented style
public lnxUser::authUser ( string $user, string $password ): bool
Procedural style
lnxAuthUser ( string $user, string $password ): bool
Authenticate a linux user.
DES, MD5, BLOWFISH, SHA-256, SHA-512 password hash methods are implemented.
Parameters
- user
- Name of the linux user
- password
- Password of the linux user
Return Values
Returns true if user authenticate is success, false otherwise.
Changelog
| Version (lnxUser) |
Description |
|---|---|
| 1.1 | add: use systemlog |
| 1.00 | available |
Examples
$user = 'testUser';
# Authenticate linux user
if ( lnxAuthUser( $user, 'HelloNSA' ) )
print( "'$user' user authentication is success!" . PHP_EOL );
else
print( "'$user' user authentication is failed!" . PHP_EOL );