質問

I understand how to check if a user exists and log them in, but I need to check what role they play (admin or client) I know to use:

if (!Auth::check('default')) { return $this->redirect('/'); }

but how would I append that to check role?

役に立ちましたか?

解決

Li3 only handles authentication directly in the core. For the counterpart responsibility of authorization, you need a library like li3_access. See the README for a breakdown of different possible configurations.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top