mixed File_SMBPasswd::delAccount (
string $name
)
This method deletes an existing account.
string $name
- account name to be deleted (username or machinename)
mixed
- Returns TRUE on success,
PEAR_Error on failure.
Using File_SMBPasswd::delAccount()
<?php
require_once 'File/SMBPasswd.php';
// delete user mbretter
$fh = new File_SMBPasswd('/usr/local/private/smbpasswd');
$fh->load();
$status = $fh->delAccount('mbretter');
if (PEAR::isError($status)) {
// handle errors
} else {
$fh->save();
}
?>