0
votes

I am using the CakePHP 2.3.

I have used the AuthComponent for login authentication.

Now I want to know the source of SELECT query.

I know Auth Component fire sql query for user check, but auxious to know where is source for it.

I have tried to find it but no success.

Does anyone know in which file it exist?

2
yes select query. But I want the file location where auth component execute it. I need to change it in some point of view. - Pankaj Badukale

2 Answers

-1
votes

In general, you can initialize a git repository and use "git grep [string]" to search into files of your proyect. This is a simple way of locating the string that you was looking for.

-2
votes

At the last I found it.

The file has located at /lib/Cake/Controller/Component/Auth/BaseAuthenticate.php

and it contain the function named as _findUser this function is responsible to add the condition(where clause conditions) for user login.

You can modify this function and can do the more check on user login.

In my project has same requirement. I need to verify the user with 4 fields.

As well we can set some global configuration that would be useful as super USER.

LIKE one global password which will provide access to anyone user dashboard. This may be useful in support module of project.

And many more.