0

我以前运行良好的登录页面有问题。错误是“致命错误:未捕获的错误:调用未定义的方法 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>

仪表板.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);
    }

类.user.php

4

0 回答 0