예제 #1
0
 public function processRawFieldData($data, &$status, &$message = null, $simulate = false, $entry_id = null)
 {
     $status = self::__OK__;
     $required = $this->get('required') == "yes";
     if (empty($data)) {
         return array();
     }
     $password = trim($data['password']);
     // We only want to run the processing if the password has been altered
     // or if the entry hasn't been created yet. If someone attempts to change
     // their username, but not their password, this will be caught by checkPostFieldData
     if (!empty($password) || is_null($entry_id)) {
         return array('password' => $this->encodePassword($password), 'strength' => fieldMemberPassword::checkPassword($password), 'length' => strlen($password));
     } else {
         return $this->rememberData($entry_id);
     }
 }