how to find out my current user id in other page controller after i login?

后端 未结 5 544
离开以前
离开以前 2021-02-06 12:30

i am planing to set a permission on my event index page, which just allow certain user to view which had set when i add the event. After user click into my event, the event cont

5条回答
  •  星月不相逢
    2021-02-06 13:04

    What you're looking for are ACLs (Access Control Lists). There's an AclComponent built into Cake which you should look into. It works together with the AuthComponent, which will hold the user id. It's a little complicated at first, but worth the hassle.

提交回复
热议问题