PEAR Manual
Prev |  | Next

# File_SMBPasswd::verifyAccount()

File_SMBPasswd::verifyAccount() -- Verifies the given account with the given plaintext passwords.

## Synopsis

``mixed File_SMBPasswd::verifyAccount` (string $user, string $pass)`

## Description

This method verifies the given username and plaintext-password against the entry in the loaded smbpasswd file.

## Parameter

- `string $user` - username to be verified

- `string $pass` - the plaintext password

## Return value

`mixed` - Returns `TRUE` on success, `FALSE` on failure.

## See

File_SMBPasswd::verifyAccountEncrypted()

## Example

Example 38-1. Using File_SMBPasswd::verifyAccount()
    <?php
    require_once 'File/SMBPasswd.php';

    $fh = new File_SMBPasswd('/usr/local/private/smbpasswd');
    $fh->load();
    if ($fh->verifyAccount('mbretter', 'MyPw')) {
        echo "Account is valid";
    } else {
        echo "Account is in-valid";
    }

    ?>

Prev | Home | Next
File_SMBPasswd::verifyAccountEncrypted() | Up | File_SMBPasswd::lock()