Public Member Functions | |
beforeSave ($object) | |
validate ($object) |
Definition at line 34 of file Password.php.
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 }