So, Last post I hope ! Here is the UsersController :

     private function isEditable($id) {
                if ($this->Auth->user('role') == 'admin') {
                        // if they are admin, so return the original id they 
wanted to
edit
                        return $id;
                 }

         // if they are not admin, so return their user id
         return $this->Auth->user('id');

    }

    public function isAuthorized($user) {
        if (parent::isAuthorized($user)) {
            return true;
        }

        if ($this->action === 'edit') {
                 $id = $this->isEditable();
             if ($this->Auth->user('id') == $id) {
             return true;
            }
        }

        return false;
    }


which returns :

Warning (2): Missing argument 1 for UsersController::isEditable(),
called in /app/Controller/UsersController.php on line 71 and defined
[APP/Controller/UsersController.php, line 54]

What am I missing ?

Thanks again for helping me.

On 16 jan, 16:23, jeremyharris <[email protected]> wrote:
> I didn't notice that he said model. Yeah you want that in your controller,
> probably.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to