У меня проблема со страницей входа, которая хорошо работала раньше.Ошибка «Неустранимая ошибка: необработанная ошибка: вызов неопределенного метода stdClass :: signupTimeStamp ()».Мой код получен из системы аутентификации UserCake.
<div id='main' style='display:none' >
Hey, $loggedInUser->displayname. This is an example secure page designed to demonstrate some of the basic features of UserCake. Just so you know, your title at the moment is $loggedInUser->title, and that can be changed in the admin panel. You registered this account on " . date("M d, Y", $loggedInUser->signupTimeStamp()) . " . usercode is: $loggedInUser->user_id.
</div>
dashboard.php
class loggedInUser {
public $email = NULL;
public $hash_pw = NULL;
public $user_id = NULL;
public $age= NULL;
public $nome= NULL;
public $dob= NULL;
public $username = NULL;
//Return the timestamp when the user registered
public function signupTimeStamp()
{
global $mysqli,$db_table_prefix;
$stmt = $mysqli->prepare("SELECT sign_up_stamp
FROM ".$db_table_prefix."users
WHERE id = ?");
$stmt->bind_param("i", $this->user_id);
$stmt->execute();
$stmt->bind_result($timestamp);
$stmt->fetch();
$stmt->close();
return ($timestamp);
}
class.user.php