UserManagement.class.php
Management for the Stud.IP global users
◆ __construct()
__construct |
( |
|
$user_id = false | ) |
|
Constructor
Pass nothing to create a new user, or the user_id from an existing user to change or delete
- Parameters
-
string | $user_id | the user which should be retrieved |
◆ __get()
◆ __set()
◆ changePassword()
changePassword |
( |
|
$password | ) |
|
Change an existing user password
- Parameters
-
- Returns
- bool change successful?
◆ changeUser()
Change an existing studip user according to the given parameters
- Parameters
-
array | structure: array('string table_name.field_name'=>'string value') |
- Returns
- bool Change successful?
◆ createNewUser()
createNewUser |
( |
|
$newuser | ) |
|
Create a new studip user with the given parameters
- Parameters
-
array | structure: array('string table_name.field_name'=>'string value') |
- Returns
- bool Creation successful?
◆ createPreliminaryUser()
createPreliminaryUser |
( |
|
$newuser | ) |
|
Create a new preliminary studip user with the given parameters
- Parameters
-
array | structure: array('string table_name.field_name'=>'string value') |
- Returns
- bool Creation successful?
◆ deleteUser()
deleteUser |
( |
bool |
$delete_documents = true , |
|
|
bool |
$delete_content_from_course = true , |
|
|
bool |
$delete_personal_documents = true , |
|
|
bool |
$delete_personal_content = true , |
|
|
bool |
$delete_names = true , |
|
|
bool |
$delete_memberships = true , |
|
|
bool |
$send_email_notification = true , |
|
|
bool |
$delete_courseware = true |
|
) |
| |
Delete an existing user from the database and tidy up
- Parameters
-
| $delete_documents | bool delete all documents in course context belonging to the user |
| $delete_content_from_course | bool delete all course content belonging to the user |
| $delete_personal_documents | bool delete all personal documents belonging to the user |
| $delete_personal_content | bool delete all personal content belonging to the user |
| $delete_names | bool delete all names identifying the user |
| $delete_memberships | bool delete all memberships of the user |
bool | $send_email_notification | bool send an email that the account has been deleted |
- Returns
- bool Removal successful?
◆ generate_password()
generate_password |
( |
|
$length | ) |
|
generate a secure password of $length characters [a-z0-9]
- Parameters
-
integer | $length | number of characters |
- Returns
- string password
◆ getFromDatabase()
getFromDatabase |
( |
|
$user_id | ) |
|
load user data from database into internal array
- Parameters
-
string | $user_id | the user which should be retrieved |
◆ getPwdHasher()
◆ sendPasswordMail()
static sendPasswordMail |
( |
|
$user, |
|
|
|
$new = false |
|
) |
| |
|
static |
Send a mail to the user denoted by the passed user-object with a link to reset the password. For admin, root and non-standard-auth a notification is sent instead.
- Parameters
-
- Returns
- void
◆ setPassword()
Mail a password generation link to the user
- Returns
- bool Password change successful?
◆ $msg
The documentation for this class was generated from the following file: