Is it possible to use Auth Component without user model? I want to have only one user of my application so I don’t want to make user model I just want to login with one login/password which would be stored in php file.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The simple answer is No.
The longer answer is that you want to use the model to store this information. Storing user passwords in a PHP file is a very bad idea, in my opinion. You’d be setting your system up to be completely inflexible. What happens when you get 5 more users?
It would be much better to have a
usersdatabase table setup with 1 record then ausersPHP file. And it’ll be a lot less work in the long run since Cake’sAuthComponentis setup to work off a database table.Also, read this post on Stack Overflow about storing passwords. It will provide some insight on why Cake’s
AuthComponentworks the way it does.