Uncaught exception 'Exception' with message 'User::authsomeLogin() is not implemented! #31

Open
mashhadi opened this Issue Nov 24, 2010 · 3 comments

Comments

Projects
None yet
3 participants
@mashhadi

Hello this problem is coming when i am in guest account.
Uncaught exception 'Exception' with message 'User::authsomeLogin() is not implemented!
how can i solve this ?

@steinkel

This comment has been minimized.

Show comment Hide comment
@steinkel

steinkel Nov 29, 2010

Collaborator

please check plugin import is correct. See the README for instructions. Also check cake version, this is a 1.3 plugin.

Collaborator

steinkel commented Nov 29, 2010

please check plugin import is correct. See the README for instructions. Also check cake version, this is a 1.3 plugin.

@meliho

This comment has been minimized.

Show comment Hide comment
@meliho

meliho Jan 30, 2011

Also, make sure that you've set your user_group_id correctly. I was hand coding it, and I set the rank value as the group id instead of the proper id, and it was throwing this same error

meliho commented Jan 30, 2011

Also, make sure that you've set your user_group_id correctly. I was hand coding it, and I set the rank value as the group id instead of the proper id, and it was throwing this same error

@steinkel

This comment has been minimized.

Show comment Hide comment
@steinkel

steinkel Feb 19, 2011

Collaborator

I've encountered this exception when login as guest after a long period with the browser opened. To solve this you can change the method authsome:login to this one

    public function login($type = 'credentials', $credentials = null) {

        $user = array();
        if ($type != 'guest'){

            $userModel = $this->__getUserModel();

            $args = func_get_args();
            if (!method_exists($userModel, 'authsomeLogin')) {
                throw new Exception(
                $userModel->alias.'::authsomeLogin() is not implemented! in model '
                );
            }

            if (!is_string($type) && is_null($credentials)) {
                $credentials = $type;
                $type = 'credentials';
            }

            $user = $userModel->authsomeLogin($type, $credentials);
        }
        Configure::write($this->settings['configureKey'], $user);
        $this->Session->write($this->settings['sessionKey'], $user);
        return $user;
    }

Collaborator

steinkel commented Feb 19, 2011

I've encountered this exception when login as guest after a long period with the browser opened. To solve this you can change the method authsome:login to this one

    public function login($type = 'credentials', $credentials = null) {

        $user = array();
        if ($type != 'guest'){

            $userModel = $this->__getUserModel();

            $args = func_get_args();
            if (!method_exists($userModel, 'authsomeLogin')) {
                throw new Exception(
                $userModel->alias.'::authsomeLogin() is not implemented! in model '
                );
            }

            if (!is_string($type) && is_null($credentials)) {
                $credentials = $type;
                $type = 'credentials';
            }

            $user = $userModel->authsomeLogin($type, $credentials);
        }
        Configure::write($this->settings['configureKey'], $user);
        $this->Session->write($this->settings['sessionKey'], $user);
        return $user;
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment