FBIRD_MODIFY_USER
Purpose
Use the fbird_modify_user
function to modify user data stored in the Firebird security
database.
Syntax
<mod_user>
::= fbird_modify_user(svc_hndl, user,
passwd [,
first [, middle [, last]]])
Element
|
Type
|
Description
|
svc_hndl
|
resource
|
Valid service handle
|
user
|
string
|
User login name
|
passwd
|
string
|
User password
|
first
|
string
|
User first name, optional
|
middle
|
string
|
User middle name, optional
|
last
|
string
|
User last name, optional
|
<return>
|
Bool
|
True if successfully completed
|
Semantics
This function modifies user data in the Firebird
security database. Only a service handle associated with the
SYSDBA user can it be used for modifying user data.
The user name string can be up to 31 characters
long. The password string can also be up to 31 characters long, but
only the first 8 characters are significant.
The function returns True if the user data was
successfully modified, otherwise it returns false.
Example
The below example sets the password for user
'peterpan' to 'qq':
// attach to the server with proper privileges if (($svc = fbird_service_attach('localhost', 'sysdba', 'masterkey')) == FALSE) { $ib_error = fbird_errmsg(); }
//
set user 'peterpan' password to
'qq' if (($result = fbird_modify_user($svc, 'peterpan', 'qq')) != FALSE) { echo 'User password
modified'; } else { $ib_error = fbird_errmsg(); } fbird_service_detach($service);
See also
service_attach,
add_user,
delete_user
|