„LnxUser::authUser” változatai közötti eltérés
Innen: IT documentation
| (Egy közbenső módosítás ugyanattól a szerkesztőtől nincs mutatva) | |||
| 8. sor: | 8. sor: | ||
Authenticate a linux user. | Authenticate a linux user. | ||
MD5, SHA-256, SHA-512 password hash methods are implemented. | DES, MD5, BLOWFISH, SHA-256, SHA-512 password hash methods are implemented. | ||
== Parameters == | == Parameters == | ||
A lap jelenlegi, 2021. szeptember 24., 11:24-kori változata
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 );