本文整理汇总了PHP中USER::updateDetails方法的典型用法代码示例。如果您正苦于以下问题:PHP USER::updateDetails方法的具体用法?PHP USER::updateDetails怎么用?PHP USER::updateDetails使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类USER
的用法示例。
在下文中一共展示了USER::updateDetails方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: hash
} else {
//if details are filled properly then run another query
try {
$query = $conn->prepare("SELECT userID FROM user WHERE email = :email");
$query->execute(array(':email' => $email));
//checks if there is an array of results
$row = $query->fetch(PDO::FETCH_ASSOC);
//fetches the results
$userID = hash('sha512', $row['userID']);
//encrypt the id
if ($userID !== $currentID) {
//if the current id != to the id from the db
$error[] = "I think you have the wrong email!";
} else {
//run the update method
if ($reset->updateDetails($email, $password)) {
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
$reset->login($email, $password);
//if successful then login
$reset->redirect('dashboard.php');
//and redirect to dashboard
}
}
}
} catch (PDOException $e) {
echo $e->getMessage();
}
}
}
}
}