本文整理汇总了PHP中UserUtils::my_ucwords方法的典型用法代码示例。如果您正苦于以下问题:PHP UserUtils::my_ucwords方法的具体用法?PHP UserUtils::my_ucwords怎么用?PHP UserUtils::my_ucwords使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserUtils
的用法示例。
在下文中一共展示了UserUtils::my_ucwords方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: trim
break;
case 'Invigilator':
$tmp_roles = 'Invigilator';
break;
case 'Staff External Examiner':
$tmp_roles = 'External Examiner';
break;
default:
$tmp_roles = 'Student';
break;
}
$new_password = trim($_POST['new_password']);
$new_surname = UserUtils::my_ucwords(trim($_POST['new_surname']));
$new_username = trim($_POST['new_username']);
$new_email = trim($_POST['new_email']);
$new_first_names = UserUtils::my_ucwords(trim($_POST['new_first_names']));
$new_grade = $_POST['new_grade'];
$new_year = isset($_POST['new_year']) ? $_POST['new_year'] : 1;
}
if (isset($_POST['submit']) and $unique_username == true) {
if ($new_username == '' or strpos($new_username, '_') !== false or $new_surname == '' or $new_email == '' or $new_first_names == '' or $new_grade == '') {
$problem = true;
} else {
$new_userID = UserUtils::create_user($new_username, $new_password, $_POST['new_users_title'], $new_first_names, $new_surname, $new_email, $new_grade, $_POST['new_gender'], $new_year, $tmp_roles, $_POST['new_sid'], $mysqli);
// Send out email welcome.
if (isset($_POST['new_welcome']) and $_POST['new_welcome'] != '') {
$result = $mysqli->prepare("SELECT email FROM users WHERE username = ?");
$result->bind_param('s', $userObject->get_username());
$result->execute();
$result->bind_result($tmp_email);
$result->fetch();