function adduser($course, $tmp_roles, $new_username, $mysqli) { $new_password = trim($_POST['new_password']); $new_surname = StringUtils::my_ucwords(trim($_POST['new_surname'])); $new_title = $_POST['new_users_title']; $new_email = trim($_POST['new_email']); $new_first_names = StringUtils::my_ucwords(trim($_POST['new_first_names'])); $new_year = $_POST['new_year']; $new_gender = $_POST['new_gender']; $userid = UserUtils::create_user($new_username, $new_password, $new_title, $new_first_names, $new_surname, $new_email, $course, $new_gender, $new_year, $tmp_roles, '', $mysqli); return $userid; }
$data = new stdClass(); $data->lookupdata = $_SESSION['ldaplookupdata'][$_REQUEST['LOOKUP']]; $output = $lookup->userlookup($data); if (!isset($output->lookupdata->yearofstudy)) { $output->lookupdata->yearofstudy = ''; } if (!isset($output->lookupdata->studentID)) { $output->lookupdata->studentID = ''; } if (!isset($output->lookupdata->coursecode)) { $output->lookupdata->coursecode = ''; } if (!isset($output->lookupdata->gender)) { $output->lookupdata->gender = ''; } $output->lookupdata->title = StringUtils::my_ucwords($output->lookupdata->title); // Stop problems with uppercase titles. if ($output->lookupdata->title == 'Prof') { $output->lookupdata->title = 'Professor'; } ?> <!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <meta http-equiv="content-type" content="text/html;charset=<?php echo $configObject->get('cfg_page_charset'); ?> "/> <title>LDAP <?php