2015-08-15 15:48:59 2747次浏览 1条回答 0 悬赏 100 金钱

大家好,我在对user的密码字段进行修改的时候,会报超时错误。

但是。。。但是。 很简单的修改密码。没有任何其他的操作,只是更新password字段。

错误触发行vendor/yiisoft/yii2/base/Security.php:565

还请朋友们解答。谢谢。

我的修改部分代码


/** @return User */
public function getUser()
{
    if ($this->_user == null) {
        $this->_user = \Yii::$app->user->identity;
    }
    return $this->_user;
}

/**
 * Saves new account settings.
 *
 * @return bool
 */
public function save()
{
    if ($this->validate()) {
        $this->user->email = $this->email;
        // 新密码没填写 则为不修改密码
        if ($this->new_password) {
            $this->user->password = $this->new_password;
        }
        return $this->user->save();
    }
    return false;
}
  • 回答于 2015-08-17 09:24 举报

    请贴出错误信息

    1 条回复
    回复于 2015-08-23 15:55 回复
    PHP Fatal Error 'yii\base\ErrorException' with message 'Maximum execution time of 5 seconds exceeded' 
    
    in /home/wwwroot/www.xxx.com/vendor/yiisoft/yii2/base/Security.php:565
    
    Stack trace:
    #0 [internal function]: yii\base\ErrorHandler->handleFatalError()
    #1 {main}
    
您需要登录后才可以回答。登录 | 立即注册
xjdata
CEO

xjdata

注册时间:2011-12-07
最后登录:6小时前
在线时长:112小时38分
  • 粉丝23
  • 金钱14169
  • 威望75
  • 积分16039

热门问题