Users table renaming

Hello, unsure where this post needs to be placed if it’s a bug or something?

I have been following the CMS tutorial and the login/ logout I created a users table as suggested, ran the baker script to get the users got it all login working fine…

I decided to rename the users table to something a bit more secure, went through the process of removing all the login/logout code from the application, ready to copy back to the controllers/ models, views where needed renamed the database table then then ran bin/cake bake all tbl_users (*tbl_ isn’t the prefix) then carefully put back all the script where needed, I then tested the login, it keeps trying to find users table and not tbl_users and keeps throwing an error users table doesn’t exist anymore!

I double checked all my code to see if there was any reference to just users NOTHING everything is relating correctly to the correct controllers/models/enities/tables

I cleared all cache, temp files and browser history, still it’s trying to find ‘Users’ table so search all the code and checked the results, Nothing relating to ‘Users’ only in the document files nothing in any of the code?

I renamed the table back to ‘Users’ then left the New Controllers/Models/Views as is and logged in… it Worked!?

is this some kind of bug or is the ‘Users’ table referenced somewhere, if so where so I can alter it to point to the correct table.


Depending on what components and plugins you’re using, the “users” name might be a default somewhere that you’d need to explicitly override in some configuration in order to change it.

But I wonder why you think you’d get better security by renaming it? Your code should not be allowing any user input to execute directly against the database, so that the “Little Bobby Tables” problem shouldn’t affect you, and if someone can get into your database, then naming won’t help you.