authentication - CakePhp - blocking the site with Auth - how? -
i want block website - using auth. in "normal" usage redirecting user login page while can still see layout. want prevent it.
i want unauthorized guest see login form
edit
i saw option use empty layout in login function, guess there way, there?
edit
bumping, anyone?
switch different layout in beforefilter
if user not logged in:
function beforefilter() { if (!$this->auth->user()) { $this->layout = 'anonymous'; } }
put in appcontroller.
the other way around works of course: if user logged in, use "full" layout , make default.ctp
minimalistic instead.
Comments
Post a Comment