Mage_Customer_Model_Customer_Attribute_Backend_Password Class Reference

Inheritance diagram for Mage_Customer_Model_Customer_Attribute_Backend_Password:

Mage_Eav_Model_Entity_Attribute_Backend_Abstract Mage_Eav_Model_Entity_Attribute_Backend_Interface

List of all members.

Public Member Functions

 beforeSave ($object)
 validate ($object)


Detailed Description

Definition at line 34 of file Password.php.


Member Function Documentation

beforeSave ( object  ) 

Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Abstract.

Definition at line 36 of file Password.php.

00037     {
00038         $password = trim($object->getPassword());
00039         if ($password) {
00040              if(Mage::helper('core/string')->strlen($password)<6){
00041                 Mage::throwException(Mage::helper('customer')->__('Password must have at least 6 characters. Leading or trailing spaces will be ignored.'));
00042             }
00043             $object->setPasswordHash($object->hashPassword($password));
00044         }
00045     }

validate ( object  ) 

Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Abstract.

Definition at line 47 of file Password.php.

00048     {
00049         if ($password = $object->getPassword()) {
00050             if ($password == $object->getPasswordConfirm()) {
00051                 return true;
00052             }
00053         }
00054 
00055         return parent::validate($object);
00056     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:04 2009 for Magento by  doxygen 1.5.8