本文整理汇总了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!'");
}
}
}