Search code examples
phpyiiyii-components

Yii: difference between access control and filters in controller


What is main difference between these two components in yii. Their purpose seems same to me. If access control is used to restrict some type of users on specific action then filters can also stop execution of an action for specific user i.e. if user isn't authenticated.

It seems same to me can anyone clearly differentiate it for me.


Solution

  • accessControl aim is authorization but filter can check request,for example run action if request type is POST.