本文整理汇总了PHP中auth::modify_user方法的典型用法代码示例。如果您正苦于以下问题:PHP auth::modify_user方法的具体用法?PHP auth::modify_user怎么用?PHP auth::modify_user使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类auth
的用法示例。
在下文中一共展示了auth::modify_user方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
exit;
}
// Check if New password is confirmed
if ($newpasswd != $confirmpasswd)
{
print "<p align=\"center\">";
print " <font face=\"Arial\" color=\"#FF0000\">";
print " <b>New password was not confirmed!</b>";
print " </font>";
print "</p>";
exit;
}
// If everything is ok, use auth class to modify the record
$update = $user->modify_user($USERNAME, $newpasswd, $check["team"], $check["level"], $check["status"]);
if ($update) {
print "<p align=\"center\">";
print " <font face=\"Arial\" color=\"#FF0000\">";
print " <b>Password Changed!</b><br>";
print " You will be required to re-login so that your session will recognize the new password. <BR>";
print " Click <a href=\"$login\">here</a> to login again.";
print " </font>";
print "</p>";
}
} // end - new password field is not empty
?>
</body>
示例2: elseif
// Delete record in signup table
$deletesignup = mysqli_query("DELETE FROM signup WHERE uname='{$username}'");
if ($delete && $deletesignup) {
$message = $delete;
} else {
$username = "";
$password = "";
$team = "Ungrouped";
$level = "";
$status = "active";
$message = "The user has been deleted.";
}
}
// MODIFY USER
if ($action == "Modify") {
$update = $user->modify_user($username, $password, $team, $level, $status);
if ($update == 1) {
$message = "User detail updated successfully.";
} elseif ($update == "blank level") {
$message = "Level field cannot be blank.";
$action = "";
} elseif ($update == "sa cannot be inactivated") {
$message = "This user cannot be inactivated.";
$action = "";
} elseif ($update == "admin cannot be inactivated") {
$message = "This user cannot be inactivated";
$action = "";
} else {
$message = "";
}
}