Firebird 2.0
PHP5 Programming
Manual

FBIRD_DELETE_USER

Use the fbird_delete_user function to remove a user from the Firebird security database.

Syntax

<delete_user> ::=
   fbird_delete_user(svc_hndl, user )


Element 
Type
Description
svc_hndl
resource
Valid service handle
user
string
User login name
<return>
Bool
True if successfully completed

Semantics

This function removes a user from the Firebird security database. Only a service handle associated with the SYSDBA user can it be used for removing users.

The function returns True is the user identity was successfully removed, otherwise it returns false.

Example

The below example removes the user 'peterpan':

// attach to the server with proper privileges
if (($svc = fbird_service_attach('localhost', 'sysdba',
                'masterkey')) == FALSE) {
   $ib_error = fbird_errmsg();
}

//remove user with name 'peterpan'
if (($result = fbird_delete_user($svc, 'peterpan')) != FALSE) {
   echo 'User deleted';
}
else {
   $ib_error = fbird_errmsg();
}
fbird_service_detach($svc);



See also

service_attach, modify_user, add_user


previous page goto index next page

Legal information