$user['lastname'] = $params['lastname'];
$user['email'] = $params['email'];
$user['password'] = $params['password'];
- return user_lib::tmp_create_user($user);
+ return tmp_create_user($user);
}
else {
throw new moodle_exception('wscouldnotcreateeuser');
if (!empty($params['firstname'])) {
$user->firstname = $params['firstname'];
}
- return user_lib::tmp_update_user($user);
+ return tmp_update_user($user);
}
else {
throw new moodle_exception('wscouldnotupdateuser');
/**
* DO NOT USE ANYTHING FROM THIS FILE - WORK IN PROGRESS
*/
-final class user_lib {
/**
* Returns a subset of users (DO NOT COUNT)
* ->lastinitial string ?
* @return array|false Array of {@link $USER} objects. False is returned if an error is encountered.
*/
- static function tmp_get_users($sort='firstname ASC', $recordsperpage=999999, $page=0, $fields='*', $selectioncriteria=NULL) {
+ function tmp_get_users($sort='firstname ASC', $recordsperpage=999999, $page=0, $fields='*', $selectioncriteria=NULL) {
global $DB;
///WS: convert array into an object
*
* @return userid or thrown exceptions
*/
- static function tmp_create_user($user) {
+ function tmp_create_user($user) {
global $CFG, $DB;
///WS: convert user array into an user object
if (is_array($user)) {
* Warning: no checks are done on the data!!!
* @param object $user
*/
- static function tmp_update_user($user) {
+ function tmp_update_user($user) {
global $DB;
if ($DB->update_record('user', $user)) {
$DB->commit_sql();
}
}
-}
+
?>