UseMuffin / HyperlinkAuth

Password-less authentication for CakePHP 3
MIT License
9 stars 1 forks source link

Defining a different userModel fails #2

Closed justinatack closed 8 years ago

justinatack commented 8 years ago

HI,

I'm trying to use this module with a different user table to the default. I need to use a Members model but the following code is not working.

$this->loadComponent('Auth', [
            'authenticate' => [
                'Muffin/HyperlinkAuth.Hyperlink' => [
                    'userModel' => 'Members'
                ]
            ]
        ]);

Any ideas?

ADmad commented 8 years ago

The userModel config is unrelated to redirection. You need to specify loginAction in AuthComponent config.

justinatack commented 8 years ago

The problem is to do with using a different table/model other than Users. I want to use Members and i cannot change it.

ADmad commented 8 years ago

Earlier you said "I keep getting redirected to users/login but it should go to members/login" and now you say "I have no issues with the redirect.". So which one is it?

The userModel config is used as expected when fetching table object here.