Prevent Mobile Acess

Hi.

I would like to prevent access system for mobile users. I tried to do this at AcessRules on my LoginController like that:


array('allow',  

'actions'=>array('login'),

users'=>array('*'),

'expression'=>'Controller::getIsMobile()'

But after some attempts, i read that can not restrict the login action and result of this is that the browser loses redirection. I thought as follows, I need not worry about actions that need authentication once if i block access login action to mobile devices,i can block all system access to them, but its doesnt work.

I searched a lot in internet but have not found a solution to this problem.

Is there any solution without using javascript? And if there is, what would be the clean way?

Can someone help me?

Thank you!

Perhaps you can detect the mobile device inside actionLogin() and if so you can render a different page instead of the standard login page.

Thank you!