User __construct(
string
$user_id
)
|
|
Class constructor. The required argument is a user's persistent identifier as was returned by the authentication source.
Parameters:
string |
$user_id: |
User Identifier as per authentication source |
API Tags:
void addAttribute(
type
$attr_name, type
$attr_value
)
|
|
This function adds a new attribute to the user. The attribute is stored persistently in the database immediately; however the priv_attributes array is not updated. To see the new attributes via getAttributes(), re-instantiate the object.
Parameters:
type |
$attr_name: |
name of the attribute to add |
type |
$attr_value: |
value of the attribute to add |
API Tags:
array beginFlushAttributes(
)
|
|
This function deletes most attributes in this profile immediately, and marks the rest (file-based attributes) for later deletion.
The typical usage is to call this function, then determine which of the file-based attributes were not selected for deletion by the user, and then delete those that were by calling commitFlushAttributes. Read-only attributes, like "user:fedadmin" are left untouched.
API Tags:
Return: | list of row id's of file-based attributes which weren't deleted (to be consumed by commitFlushAttributes) |
Access: | public |
void commitFlushAttributes(
array
$tobedeleted
)
|
|
This function deletes attributes from the database by their database row ID. Its typical (only) use is to take the return of beginFlushAttribute() and delete the attributes in there. It only deletes rows which actually belong to the instantiated user.
Parameters:
array |
$tobedeleted: |
array of database rows which are to be deleted |
API Tags:
array getAttributes(
[string
$option_name = 0]
)
|
|
This function retrieves the known attributes of the user from the private member priv_attributes.
The attributes are not taken "fresh" from the database; this is a performance optimisation. The function's single parameter $option_name is optional - if specified, it only returns the attributes of the given type. Otherwise, all known attributes are returned.
Parameters:
string |
$option_name: |
name of the option whose values are to be returned |
API Tags:
Return: | of attributes |
Access: | public |
boolean isFederationAdmin(
[string
$federation = 0]
)
|
|
This function checks whether a user is a federation administrator. When called without argument, it only checks if the user is a federation administrator of *any* federation. When given a parameter (ISO shortname of federation), it checks if the user administers this particular federation.
Parameters:
string |
$federation: |
optional: federation to be checked |
API Tags:
Return: | TRUE if the user is federation admin, FALSE if not |
Access: | public |
This function tests if the current user has been configured as the system superadmin, i.e. if the user is allowed to execute the 112365365321.php script
API Tags:
Return: | TRUE if the user is a superadmin, FALSE if not |
Access: | public |
void sendMailToUser(
$subject,
$content
)
|
|
Parameters:
API Tags: