edusoho 创建token令牌
2019-11-04 本文已影响0人
浩克啊12138
主程序
$user = $this->getCurrentUser()->toArray();
$token= $this->getUserService()->makeToken('mobile_login', $user['id'], time() + 3600 * 24 * 30);
var_dump($token);
将这段代码添加至 src/AppBundle/Controller/Admin/UserController :: indexAction中, 可在HOST/user页面查看