簡體   English   中英

如果登錄前端也登錄Yii2?

[英]How to make if Login in frontend also login in backen in Yii2?

嗨,我想問一下如何登錄功能,如果我在前端登錄,用戶也登錄Yii2的后端

我試圖從前端進行會話,但在后端,會話無法獲得。

backend/config/main添加:

'components' => [

        'session' => [
            // this is the name of the session cookie used for login on the backend
            'name' => 'test',
        ],

    ]

name必須與前端中的會話name相同

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM