Tuesday, January 14, 2014

Re: Error: Class 'SimplePasswordHasher' not found

Yes i meant User model.

I fixed the problem.

The following does not work
App::uses('AppModel', 'Model', 'SimplePasswordHasher', 'Controller/Component/Auth');

The following does
App::uses('AppModel', 'Model');
App::uses('SimplePasswordHasher', 'Controller/Component/Auth');

On Saturday, 4 January 2014 00:47:35 UTC+11, Gerben Wartena wrote:
I had exactly the same issue when I did the tutorial, but it had to do with caching/refreshing because suddenly it worked.
In your case: you do mean the 'User' model; it should not be 'Users'.
I only have 'App::uses('SimplePasswordHasher', 'Controller/Component/Auth');' and it works just fine.

Op vrijdag 3 januari 2014 06:49:28 UTC+1 schreef Justin Atack:
Hi All,

I hope you can point me in the right direction.


I'm using CakePHP 2.4.3 and have followed the guide to the letter of the law. It mostly works correctly. If I try to access a controller/action it redirects as it should to the users/login action... so that's seems fine.

The issue is when I try to add a new user at users/add. It throws this error: Error: Class 'SimplePasswordHasher' not found

I have made sure that the following is pasted in the top of the Users model: App::uses('AppModel', 'Model', 'SimplePasswordHasher', 'Controller/Component/Auth');

I then thought that perhaps this "SimplePasswordHasher" class was a new thing part of 2.4.4 so I set up another test project to test it and went through the entire Auth tutorial again with exactly the same results.

Where am I going wrong? It there some code missing? 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: