public function getUserInfo() { $userId = I('post.user_id'); $lastOperTime = I('post.lastOperTime'); $ret = array('success' => false); if (session('userId') && session('userId') == $userId && session('confirmTime') && session('confirmTime') == $lastOperTime) { $model = new \Home\Model\UserModel(); $userInfo = $model->getUserById($userId); if ($userInfo) { $ret['success'] = true; $ret['userInfo'] = $userInfo; } } $this->ajaxReturn($ret); }