function normalize() { // user may have entered spaces accidentally in the password field. // Clean them up. $this->set(trim($this->get())); parent::normalize(); }
/** * Normalize POSTed data * * @return void */ function normalize() { $data = $this->get(); if (is_array($data)) { $data = join($this->separator, $data); } $data = trim($data, $this->separator); if (get_magic_quotes_gpc()) { $this->set(stripslashes($data)); } else { $this->set($data); } return parent::normalize(); }