Hi Everybody,

I am using the Auth component for a simple site. No ACL required.

I have installed WordPress for the blogging and want to restrict users
who are not signed in.

I have WP installed in webroot.

I thought maybe this would work but no avail.

in app-controller.php

if (isset($this->params['admin'])) {
                                if ($this->Auth->user('group') == '1') {
                                        return true;
                                }
                                $this->Session->setFlash(__('You are not an 
administrator.',
true));
                                $this->redirect(array('controller' => 'pages', 
'action' =>
'display', 'home', 'admin' => false));
                }

if (isset($this->params['blog'])) {
                                if ($this->Auth->user('group') == '2') {
                                        return true;
                                }
                                $this->Session->setFlash(__('Please Register or 
Login to Ask A
Question.', true));
                                $this->redirect(array('controller' => 'pages', 
'action' =>
'display', 'home', 'admin' => false));
                }

The admin function works great but can't get it to work with blog.

I do have admin routing on so I imagine that is why it works there.

Any suggestions on how to protect a webroot app?

Thanks,

Brad

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to