本文整理匯總了PHP中UserDao::updateUserEmail方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserDao::updateUserEmail方法的具體用法?PHP UserDao::updateUserEmail怎麽用?PHP UserDao::updateUserEmail使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UserDao
的用法示例。
在下文中一共展示了UserDao::updateUserEmail方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: handleForm
public function handleForm(Context $context, $action)
{
//TODO: Check user level >= ADMIN
if ($action == "savePassword") {
if (isset($_POST['newpass']) && $_POST['newpass'] != "" && (isset($_POST['confpass']) && $_POST['confpass'] != "")) {
$newPassword = $_POST['newpass'];
$confirmPassword = $_POST['confpass'];
if ($newPassword = $confirmPassword) {
UserDao::updateUserPassword($_POST['userid'], $newPassword);
$context->addMessage("Password Successfully Changed.");
} else {
$context->addError("Passwords Don't Match.");
}
} else {
$context->addError("Required Field Left Blank.");
}
} else {
if ($action == "saveEmail") {
if (isset($_POST['email']) && $_POST['email'] != "") {
$email = $_POST['email'];
UserDao::updateUserEmail($_POST['userid'], $email);
$context->addMessage("Email Successfully Changed.");
} else {
$context->addError("Required Field Left Blank.");
}
} else {
if ($action == "saveUserLevel") {
if (isset($_POST['level']) && $_POST['level'] != "") {
$userlevel = $_POST['level'];
UserDao::updateUserLevel($_POST['userid'], $userlevel);
$context->addMessage("User Level Successfully Changed.");
} else {
$context->addError("Required Field Left Blank.");
}
} else {
if ($action == "saveNotes") {
if (isset($_POST['notes']) && $_POST['notes'] != "") {
$notes = $_POST['notes'];
UserDao::updateUserNotes($_POST['userid'], $notes);
$context->addMessage("Notes Successfully Changed.");
} else {
$context->addError("Required Field Left Blank.");
}
} else {
if ($action == "saveName") {
if (isset($_POST['name']) && $_POST['name'] != "") {
$name = $_POST['name'];
UserDao::updateName($_POST['userid'], $name);
$context->addMessage("Name Successfully Changed.");
} else {
$context->addError("Required Field Left Blank.");
}
} else {
$context->addError("Incorrect Action.");
}
}
}
}
}
}