本文整理匯總了PHP中Authentication::setPassword方法的典型用法代碼示例。如果您正苦於以下問題:PHP Authentication::setPassword方法的具體用法?PHP Authentication::setPassword怎麽用?PHP Authentication::setPassword使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Authentication
的用法示例。
在下文中一共展示了Authentication::setPassword方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: elseif
exit;
}
$post_value = $_POST;
//Check logout request.
if (isset($post_value['value']) && $post_value['value'] == 'logout') {
//Call logout function
Authentication::logout();
} elseif (!empty($post_value['update'])) {
//Call Update profile function
Authentication::updateProfile($post_value);
} elseif (isset($post_value['newpassword']) && !empty($post_value['newpassword'])) {
//Call change Password function
Authentication::changePassword($post_value);
} elseif (isset($post_value['password']) && !empty($post_value['password'])) {
//Call Set password function
Authentication::setPassword($post_value);
} elseif (isset($post_value['value']) && $post_value['value'] == 'accountUnLink') {
//Call Update profile function
Authentication::unlinkAccount($post_value);
} elseif (isset($post_value['value']) && $post_value['value'] == 'accountLink') {
//Call Update profile function
Authentication::linkAccount($post_value);
}
$data = $_SESSION['userprofile'];
include_once 'includes/header.php';
?>
<!-- Add Profile page content-->
<div class="lr-profile-frame lr-input-style">
<div class="lr-profile-header">
<?php
$image_url = isset($data->ImageUrl) && !empty($data->ImageUrl) ? $data->ImageUrl : "assets/images/user.png";
示例2: switch
$e_username = true;
}
if (is_null($password)) {
$error[] = "Password";
$e_password = true;
}
if (is_null($email)) {
$error[] = "Email";
$e_email = true;
}
if (count($error) > 0) {
$loadfile = "login/login_error.tpl";
} else {
$auth->setEmail($email);
$auth->setUsername($username);
$auth->setPassword($password);
if ($auth->Authenticate()) {
$loadfile = "login/login_successful.tpl";
$redirect = "/#1";
} else {
$loadfile = "login/login_{$auth->getError()}.tpl";
switch ($auth->getError()) {
case "email":
$e_email = true;
break;
case "username":
$e_username = true;
break;
case "password":
$e_password = true;
break;