本文整理匯總了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();