In my database I have an employees table instead of a users table. I have been able to get logins to work when I create a user table and all the associates files as per the tutorial.
I was wondering if:
- is it a best practice to use a table called user
- Do I absolutely have to use a UserController or can I reference something else?
Sorry if this is an easy question (or one that is answered else where that I didn’t find)
[ Deprecated (16384)](javascript:void(0);): Cake\Controller\Component\AuthComponent::config() is deprecated. Use setConfig()/getConfig() instead. - /var/www/html/timetracker/src/Controller/AppController.php, line: 61 You can disable deprecation warnings by setting Error.errorLevel to E_ALL & ~E_USER_DEPRECATED in your config/app.php. [ CORE/src/Core/functions.php , line 310 ]
Aside from the deprecation warning, you have to set the loginAction to point to your controller (Employees?), the userModel too. Then you can have an action login in EmployeesController
AFAIK you can’t have 2 controllers for login, is either UsersController or EmployeesController