Tuesday, July 6, 2010

Re: ACL customization

Thanks alot brother

On Jul 6, 12:38 pm, jodator <joda...@gmail.com> wrote:
> 1 & 2 -> custom login action
>
> 3 -> well basically the same as 1 & 2. You can do it all in one login
> action in users_controller:
>
>   function login() {
>
>     if ($this->Session->read('Auth.User')) {
>       //Is acc enabled?
>       $emailAuhtenticated = $this->Session->read('Auth.User.email_authenticated');
>
>       if (!$emailAuhtenticated) {
>         $this->Session->setFlash('Konto oczekuje na potwierdzenie
> email', 'default', array(), 'auth');
>         $this->Auth->logout();
>       }
>       //Redirect to admin dashboard
>       if ($this->Session->read('Auth.User.group_id') == 1) {
>         $this->redirect(array('controller' => 'configs', 'admin' =>
> true));
>       } else {
>           $this->redirect('/');
>       }
>     }
>     // Show the login form
>     $this->Session->write('login.refer', $this->referer('/'));
>   }
>
> ps.: This is my login action and it works ;) So you should be able to
> expand it to your needs
>
> best regards
>
> On Jul 6, 8:25 am, mirfan <m.irfa...@gmail.com> wrote:
>
> > Hi dear cake developers,
> > I am using cakeACLand Auth component which i want to customize my
> > requirements are:
>
> > 1. User should not looged in until his account is being verified by
> > admin
>
> > 2. If he is not verified and try to login he may be redirected to a
> > page informing about his status
>
> > 3. I have three groups Admin, Publisher and Advertiser if anyone of
> > them login they may be redirected to their relevant dashboard.
>
> > Please help me.

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate