# Users table renaming

**URL:** <https://discourse.cakephp.org/t/users-table-renaming/7461>\
**Category:** Need Help\
**Created:** [March 13, 2020, 11:22am UTC](https://discourse.cakephp.org/t/users-table-renaming/7461 "2020-03-13T11:22:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![newbie](https://avatars.discourse-cdn.com/v4/letter/n/dc4da7/32.png) [@newbie](https://discourse.cakephp.org/u/newbie)\
**Post date:** [March 13, 2020, 11:22am UTC](https://discourse.cakephp.org/t/users-table-renaming/7461/1 "2020-03-13T11:22:57Z")

</div>

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.

Regards

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [March 13, 2020, 6:53pm UTC](https://discourse.cakephp.org/t/users-table-renaming/7461/2 "2020-03-13T18:53:39Z")

</div>

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.
