claroline/claroline/inc/lib/user.lib.php File Reference

Go to the source code of this file.

Namespaces

namespace  CLUSR

Functions

 user_initialise ()
 user_get_properties ($userId)
 user_create ($settingList, $creatorId=null)
 user_set_properties ($userId, $propertyList)
 user_delete ($userId)
 claro_get_uid_of_platform_admin ()
 claro_get_uid_of_request_admin ()
 claro_get_uid_of_platform_contact ()
 claro_get_uid_of_system_notification_recipient ()
 claro_set_uid_recipient_of_system_notification ($user_id, $state=true)
 claro_set_uid_of_platform_contact ($user_id, $state=true)
 claro_set_uid_recipient_of_request_admin ($user_id, $state=true)
 user_is_admin ($userId)
 user_set_platform_admin ($status, $userId)
 user_send_registration_mail ($userId, $data)
 profile_send_request_course_creator_status ($explanation)
 profile_send_request_revoquation ($explanation, $login, $password)
 generate_passwd ($nb=8)
 is_well_formed_email_address ($address)
 user_validate_form_registration ($data)
 user_validate_form_profile ($data, $userId)
 user_validate_form_admin_user_profile ($data, $userId)
 user_validate_form ($formMode, $data, $userId=null)
 user_check_authentication ($password, $login)
 is_password_secure_enough ($requestedPassword, $forbiddenValueList)
 is_username_available ($username, $userId=null)
 is_official_code_available ($official_code, $userId=null)
 user_html_form_registration ($data)
 user_html_form_profile ($data)
 user_html_form_add_new_user ($data)
 user_html_form_admin_add_new_user ($data)
 user_html_form_admin_user_profile ($data)
 user_html_form ($data, $form_type='registration')
 user_html_search_form ($data)
 user_search ($criterionList=array(), $courseId=null, $allCriterion=true, $strictCompare=false, $ignoreDisabledAccounts=false)
 user_display_preferred_language_select_box ()
 get_user_property_list ($userId, $force=false, $getUndefinedProperties=false)
 get_user_property ($userId, $propertyId, $force=false)
 set_user_property ($userId, $propertyId, $propertyValue, $scope='')
 get_userInfoExtraDefinitionList ()
 update_userInfoExtraDefinition ($propertyId, $label, $type, $defaultValue, $contextScope, $rank, $required)
 delete_userInfoExtraDefinition ($propertyId, $contextScope)
 claro_get_user_course_list ($user_id=null)
 user_get_private_folder_path ($userId)
 user_get_private_folder_url ($userId)
 user_get_picture_path ($userData)
 user_get_picture_url ($userData)
 user_get_extra_data ($userId)

Function Documentation

claro_get_uid_of_platform_admin (  ) 
Returns:
list of users wich have admin status
Author:
Christophe Gesché <Moosh@claroline.net>

Definition at line 273 of file user.lib.php.

claro_get_uid_of_platform_contact (  ) 
Returns:
list of users wich have status to receive system notification
Author:
Christophe Gesché <Moosh@claroline.net>

Definition at line 317 of file user.lib.php.

claro_get_uid_of_request_admin (  ) 
Returns:
list of users wich have status to receipt REQUESTS
Author:
Christophe Gesché <Moosh@claroline.net>

Definition at line 292 of file user.lib.php.

claro_get_uid_of_system_notification_recipient (  ) 
Returns:
list of users wich have status to receive system notification
Author:
Christophe Gesché <Moosh@claroline.net>

Definition at line 342 of file user.lib.php.

claro_get_user_course_list ( user_id = null  ) 

Definition at line 1629 of file user.lib.php.

claro_set_uid_of_platform_contact ( user_id,
state = true 
)

Definition at line 376 of file user.lib.php.

claro_set_uid_recipient_of_request_admin ( user_id,
state = true 
)

Definition at line 393 of file user.lib.php.

claro_set_uid_recipient_of_system_notification ( user_id,
state = true 
)

Definition at line 359 of file user.lib.php.

delete_userInfoExtraDefinition ( propertyId,
contextScope 
)

Set or redefine an extended data for users.

Parameters:
integer $propertyId
string $contextScope
Returns:
claro_sql result

Definition at line 1617 of file user.lib.php.

generate_passwd ( nb = 8  ) 

Generates randomly password

Author:
Damien Seguy
Returns:
string : the new password

Definition at line 578 of file user.lib.php.

get_user_property ( userId,
propertyId,
force = false 
)

Return a property of a user.

Parameters:
interger $userId
string $propertyId
Returns:
mixed value of the selected property for given user

Definition at line 1528 of file user.lib.php.

get_user_property_list ( userId,
force = false,
getUndefinedProperties = false 
)

Extended properties some info can be added for each user without change structure of user table. To do that , add a description Get all properties for a user

Parameters:
int $userId
boolean $force reload data from database. Use it if data can change between two call in same script
boolean $getUndefinedProperties. if false, function return only field where data overwrite the default value (NULL)
Returns:
array of properties array (array[]=array(propertyId, propertyValue,scope )

Definition at line 1484 of file user.lib.php.

get_userInfoExtraDefinitionList (  ) 

get the list of extraProperties for user accounts

Since:
claroline 1.8
Returns:
array('propertyId'=>array('propertyId', 'label', 'type', 'defaultValue', 'required');

Definition at line 1562 of file user.lib.php.

is_official_code_available ( official_code,
userId = null 
)

Check if the official code is available

Parameters:
string official code
integer user_id
Returns:
boolean

Definition at line 870 of file user.lib.php.

is_password_secure_enough ( requestedPassword,
forbiddenValueList 
)

Check if the password chosen by the user is not too much easy to find

Author:
Hugues Peeters <hugues.peeters@advalvas.be>
Parameters:
string requested password
array list of other values of the form we wnt to check the password
Returns:
boolean true if not too much easy to find

Definition at line 813 of file user.lib.php.

is_username_available ( username,
userId = null 
)

Check if the username is available

Parameters:
string username
integer user_id
Returns:
boolean

Definition at line 847 of file user.lib.php.

is_well_formed_email_address ( address  ) 

Check an email

Version:
1.0
Parameters:
string $email email to check
Returns:
boolean state of validity.
Author:
Christophe Gesche <moosh@claroline.net>

Definition at line 633 of file user.lib.php.

profile_send_request_course_creator_status ( explanation  ) 

Current logged user send a mail to ask course creator status

Parameters:
string explanation message
Author:
Mathieu Laurent <laurent@cerdecam.be>

Definition at line 486 of file user.lib.php.

profile_send_request_revoquation ( explanation,
login,
password 
)

Current logged user send a mail to ask course creator status

Parameters:
string explanation message
Author:
Mathieu Laurent <laurent@cerdecam.be>

Definition at line 530 of file user.lib.php.

set_user_property ( userId,
propertyId,
propertyValue,
scope = '' 
)

Definition at line 1543 of file user.lib.php.

update_userInfoExtraDefinition ( propertyId,
label,
type,
defaultValue,
contextScope,
rank,
required 
)

Set or redefine an extended data for users.

Parameters:
integer $propertyId
string $label
string $type
mixed $defaultValue
string $contextScope
integer $rank
boolean $required
Returns:
claro_sql result

Definition at line 1591 of file user.lib.php.

user_check_authentication ( password,
login 
)

Check if the authentication fassword for the given user

Author:
Frederic Minne <zefredz@claroline.net>
Parameters:
string $password
string $login
Returns:
boolean

Definition at line 782 of file user.lib.php.

user_create ( settingList,
creatorId = null 
)

Add a new user

Parameters:
$settingList array to fill the form
$creatorId id of account creator (null means created by owner) default null
Author:
Mathieu Laurent <laurent@cerdecam.be>

Definition at line 94 of file user.lib.php.

user_delete ( userId  ) 

Delete user form claroline platform

Author:
Mathieu Laurent <laurent@cerdecam.be>
Parameters:
int $userId
Returns:
boolean 'true' if it succeeds, 'false' otherwise

Definition at line 216 of file user.lib.php.

user_display_preferred_language_select_box (  ) 

Get html select box for a user language preference

Returns:
string html
Since:
1.8

Definition at line 1450 of file user.lib.php.

user_get_extra_data ( userId  ) 

$extraInfo['user_id']['label'] = get_lang('User id'); $extraInfo['user_id']['value'] = $userId;

Definition at line 1701 of file user.lib.php.

user_get_picture_path ( userData  ) 

Definition at line 1673 of file user.lib.php.

user_get_picture_url ( userData  ) 

Definition at line 1687 of file user.lib.php.

user_get_private_folder_path ( userId  ) 

Definition at line 1659 of file user.lib.php.

user_get_private_folder_url ( userId  ) 

Definition at line 1666 of file user.lib.php.

user_get_properties ( userId  ) 

Get common user data on the platform

Parameters:
integer $userId id of user to fetch properties
Returns:
array( `user_id`, `lastname`, `firstname`, `username`, `email`, `picture`, `officialCode`, `phone`, `isCourseCreator` ) with user data
Author:
Mathieu Laurent <laurent@cerdecam.be>

Definition at line 57 of file user.lib.php.

user_html_form ( data,
form_type = 'registration' 
)

Display form to edit or add user to the platform

Author:
Mathieu Laurent <laurent@cerdecam.be>
Parameters:
$data array to fill the form

Definition at line 949 of file user.lib.php.

user_html_form_add_new_user ( data  ) 

Display user form registration

Parameters:
$data array to fill the form
Author:
Mathieu Laurent <laurent@cerdecam.be>

Definition at line 916 of file user.lib.php.

user_html_form_admin_add_new_user ( data  ) 

Display user admin form registration

Author:
Mathieu Laurent <laurent@cerdecam.be>
Parameters:
$data array to fill the form

Definition at line 927 of file user.lib.php.

user_html_form_admin_user_profile ( data  ) 

Display user admin form registration

Author:
Mathieu Laurent <laurent@cerdecam.be>
Parameters:
$data array to fill the form

Definition at line 938 of file user.lib.php.

user_html_form_profile ( data  ) 

Display user form profile

Author:
Mathieu Laurent <laurent@cerdecam.be>
Parameters:
$data array to fill the form

Definition at line 901 of file user.lib.php.

user_html_form_registration ( data  ) 

Display user form registration

Author:
Mathieu Laurent <laurent@cerdecam.be>
Parameters:
$data array to fill the form

Definition at line 890 of file user.lib.php.

user_html_search_form ( data  ) 

Display form to search already registered users to add to course Used when course managers can only add already registered users to their courses

Author:
Jean-Roch Meurisse <jmeuriss@fundp.ac.be>
Parameters:
$data array to fill the form

Definition at line 1305 of file user.lib.php.

user_initialise (  ) 

Initialise user data

Returns:
array with user data
Author:
Mathieu Laurent <laurent@cerdecam.be>

Definition at line 30 of file user.lib.php.

user_is_admin ( userId  ) 

Return true, if user is admin on the platform

Parameters:
$userId 
Returns:
boolean
Author:
Hugues Peeters <hugues.peeters@advalvas.be>

Definition at line 417 of file user.lib.php.

user_search ( criterionList = array(),
courseId = null,
allCriterion = true,
strictCompare = false,
ignoreDisabledAccounts = false 
)
Parameters:
array $criterionList - Allowed keys are 'name', 'firstname', 'email', 'officialCode','username'
string $courseId (optional) permit check if user are already enrolled in the concerned cours
boolean $allCriterion (optional) define if all submited criterion has to be set.
boolean $strictCompare (optional) define if criterion comparison use wildcard or not
boolean $ignoreDisabledAccounts (optional) define disabled accounts are ignored or not (default : ignored)
Returns:
array : existing users who met the criterions

Definition at line 1377 of file user.lib.php.

user_send_registration_mail ( userId,
data 
)

Send registration succeded email to user

Author:
Mathieu Laurent <laurent@cerdecam.be>
Parameters:
integer $userId
mixed $data array of user data or null to keep data following $userId param.
Returns:
boolean

Definition at line 446 of file user.lib.php.

user_set_platform_admin ( status,
userId 
)

Set or unset platform administrator status to a specific user

Author:
Hugues Peeters <hugues.peeters@advalvas.be>
Parameters:
boolean $status
int $userId
Returns:
boolean 'true' if it succeeds, 'false' otherwise

Definition at line 432 of file user.lib.php.

user_set_properties ( userId,
propertyList 
)

Update user data

Parameters:
$user_id integer
$propertyList array
Author:
Mathieu Laurent <laurent@cerdecam.be>

Definition at line 151 of file user.lib.php.

user_validate_form ( formMode,
data,
userId = null 
)

validate user form

Author:
Hugues Peeters <hugues.peeters@claroline.net>
Frederic Minne <zefredz@claroline.net>
Parameters:
string $mode 'registration' or 'profile' or 'admin_user_profile'
array $data to fill the form
int $userId (optional) id of the user account currently edited
Returns:
array with error messages

Definition at line 687 of file user.lib.php.

user_validate_form_admin_user_profile ( data,
userId 
)

validate form profile from user administration

Author:
Frederic Minne <zefredz@claroline.net>
Parameters:
array $data to fill the form
int $userId id of the user account currently edited
Returns:
array with error messages

Definition at line 673 of file user.lib.php.

user_validate_form_profile ( data,
userId 
)

validate form profile

Author:
Hugues Peeters <hugues.peeters@claroline.net>
Parameters:
array $data to fill the form
int $userId id of the user account currently edited
Returns:
array with error messages

Definition at line 661 of file user.lib.php.

user_validate_form_registration ( data  ) 

validate form registration

Author:
Hugues Peeters <hugues.peeters@claroline.net>
Parameters:
array $data from the form
Returns:
array with error messages

Definition at line 648 of file user.lib.php.

Generated on Tue Jun 8 12:28:37 2010 for Claroline API by  doxygen 1.6.3