setScriptUserId()

Sets the current user ID of the script to the specified value.

Synopsis

int setScriptUserId(unsigned uid);

Parameters

Parameter Description
uid Required user ID

Return value

-1 in the event of an error, if, for example, a user with the ID does not exist; if successful 0.

Errors

missing/incorrect argument

Description

This function is called with the required user number to define the current user for the current script.

Example

main()
{
  setScriptUserId(0); // root user
}

Assignment

User administration

Availability

CTRL