Discussion:
Fatal error: Class 'security' not found... in cake 2
Daniel
2012-01-09 18:09:29 UTC
Permalink
I imported some code from a cake 1.3 application to cake 2, now I get
an error on the following line:
$this->data['User']['password'] = security::hash($this->data['User']
['password'], NULL, TRUE);

Fatal error: Class 'security' not found in C:\xampp\htdocs\xxxxxx\Model
\User.php on line 112
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe-/***@public.gmane.org For more options, visit this group at http://groups.google.com/group/cake-php
Miles J
2012-01-09 18:15:40 UTC
Permalink
First off, security should be capitalized. Secondly, import it:

App::uses('Security', 'Utility');
Post by Daniel
I imported some code from a cake 1.3 application to cake 2, now I get
$this->data['User']['password'] = security::hash($this->data['User']
['password'], NULL, TRUE);
Fatal error: Class 'security' not found in C:\xampp\htdocs\xxxxxx\Model
\User.php on line 112
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe-/***@public.gmane.org For more options, visit this group at http://groups.google.com/group/cake-php
Tilen Majerle
2012-01-09 19:56:22 UTC
Permalink
and for hasing user passwords use AuthComponent::password('yourpassword');
--
Lep pozdrav, Tilen Majerle
http://majerle.eu
Post by Miles J
App::uses('Security', 'Utility');
Post by Daniel
I imported some code from a cake 1.3 application to cake 2, now I get
$this->data['User']['password'] = security::hash($this->data['User']
['password'], NULL, TRUE);
Fatal error: Class 'security' not found in C:\xampp\htdocs\xxxxxx\Model
\User.php on line 112
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.
To unsubscribe from this group, send email to
at http://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe-/***@public.gmane.org For more options, visit this group at http://groups.google.com/group/cake-php
Daniel
2012-01-09 20:12:57 UTC
Permalink
Thanks. I'm guessing Utility is not neccessarily needed?
Post by Miles J
App::uses('Security', 'Utility');
Post by Daniel
I imported some code from a cake 1.3 application to cake 2, now I get
$this->data['User']['password'] = security::hash($this->data['User']
['password'], NULL, TRUE);
Fatal error: Class 'security' not found in C:\xampp\htdocs\xxxxxx\Model
\User.php on line 112- Hide quoted text -
- Show quoted text -
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe-/***@public.gmane.org For more options, visit this group at http://groups.google.com/group/cake-php
Miles J
2012-01-10 02:27:47 UTC
Permalink
It should be needed, it defines the package to import from.
Thanks.  I'm guessing Utility is not neccessarily needed?
Post by Miles J
App::uses('Security', 'Utility');
Post by Daniel
I imported some code from a cake 1.3 application to cake 2, now I get
$this->data['User']['password'] = security::hash($this->data['User']
['password'], NULL, TRUE);
Fatal error: Class 'security' not found in C:\xampp\htdocs\xxxxxx\Model
\User.php on line 112- Hide quoted text -
- Show quoted text -
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe-/***@public.gmane.org For more options, visit this group at http://groups.google.com/group/cake-php
Continue reading on narkive:
Loading...