本文整理匯總了PHP中Authenticate::createUser方法的典型用法代碼示例。如果您正苦於以下問題:PHP Authenticate::createUser方法的具體用法?PHP Authenticate::createUser怎麽用?PHP Authenticate::createUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Authenticate
的用法示例。
在下文中一共展示了Authenticate::createUser方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isset
if ($view == "addAUser") {
//grab the feed back info if it is set already
$fbk = isset($_GET['feedback']) ? $_GET["feedback"] : "";
$smarty->assign("feedback", $fbk);
$smarty->assign("mainContent", $smarty->fetch("addAUser.tpl"));
} else {
if ($view == "adminView") {
} else {
$smarty->assign("mainContent", "<p>Welcome to the admin main page where the admin can make the following changes listed in the menu by the side!</p>\n\t\t <p>Select one fo the options by the side menu and carry out the function.</p>");
}
}
} else {
$smarty->assign("mainContent", "<p>Welcome to the admin main page where the admin can make the following changes listed in the menu by the side!</p>\n\t<p>Select one fo the options by the side menu and carry out the function.</p>\t\n");
}
$smarty->display("admin.tpl");
if (isset($_POST["addUserAction"])) {
//start grabing useful values
$username = htmlentities(htmlspecialchars($_POST["userName"]));
$password = htmlentities(htmlspecialchars($_POST["password"]));
$email = htmlentities(htmlspecialchars($_POST["email"]));
$loginType = htmlentities(htmlspecialchars($_POST["loginType"]));
if ($loginType == "") {
header("Location:../admin/index.php?view=addAUser&feedback=You must choose a privelege for the user you wish to add!");
} else {
if ($auth->createUser($email, $username, $password, $loginType)) {
header("Location:../admin/index.php?view=addAUser&feedback=User added succesfully! You can now login'");
} else {
header("Location:../admin/index.php?view=addAUser&feedback='An Error ocured trying to add the user!'");
}
}
}