delight-im / PHP-Auth

Authentication for PHP. Simple, lightweight and secure.
MIT License
1.11k stars 235 forks source link

use a SCHEMA for database tables #305

Open hauke-97 opened 6 months ago

hauke-97 commented 6 months ago

Can I use a SCHEMA for all tables needed for PHP-Auth? I created all tables with the prefix phpauth., but the code doesn´t refer to these tables. Instead of, another table named users is referenced. How can I define the SCHEMA, that should be looked up?

ocram commented 6 months ago

Thank you!

Do you just want to rename all the tables needed for this library to start with a shared prefix, such as phpauth. or phpauth_?

From the README:

Should your database tables for this library need a common prefix, e.g. my_users instead of users (and likewise for the other tables), pass the prefix (e.g. my_) as the third parameter to the constructor, which is named $dbTablePrefix. This is optional and the prefix is empty by default.

Does this help? Or do you need something else?