edusoho 支持同一账号多人同时登录

2018-11-17 01:05:31 admin 7

文件:

./src/Topxia/WebBundle/Listener/UserLoginTokenListener.php

函数:

public function onGetUserLoginListener(GetResponseEvent $event)

注释掉代码:

if ($userLoginToken != $user['loginSessionId']) {$request->getSession()->invalidate();$this->container->get("security.context")->setToken(null);$goto = $this->container->get('router')->generate('login');$response = new RedirectResponse($goto, '302');setcookie("REMEMBERME", '', -1);$this->container->get('session')->getFlashBag()->add('danger', '此帐号已在别处登录,请重新登录');$event->setResponse($response);
}