Groups
Sign in
Groups
CakePHP-ja
Conversations
About
Send feedback
Help
Auth->userModel != 'User' の時に Auth->user() を Session#startup 前に呼ばない方がいい
25 views
Skip to first unread message
custar
unread,
Sep 21, 2009, 2:39:13 PM
9/21/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to CakePHP-ja
Auth->userModel を "User" 以外に変更している場合、
Auth 以外の Component の initialize() で Auth->user() を使うと、
その呼び出しにより、
Auth->sessionKey がデフォルト値 (Auth.User) に設定されてしまい、
login できなくなる。
dispatcher 内では
(1) component->initialize()
(2) controller->beforeFilter()
(3) component->startup()
の順だから、(3) で SessionComponent が呼ばれる前に、
Session の絡む Auth methods を呼ぶと上記の通りなる。
確認はしていないが、(2) で呼んだ場合でも起こり得るかもしれない。
Reply all
Reply to author
Forward
0 new messages