// Small changes on validateController

This commit is contained in:
rGaillard
2012-01-02 10:09:36 +00:00
parent 227ee1a5d0
commit e2e11ae580
4 changed files with 66 additions and 90 deletions
-21
View File
@@ -44,27 +44,6 @@ class IdentityControllerCore extends FrontController
*/
public function postProcess()
{
if (count($_POST))
{
$exclusion = array('secure_key',
'old_passwd',
'passwd',
'active',
'date_add',
'date_upd',
'last_passwd_gen',
'newsletter_date_add',
'id_default_group',
'id_shop',
'id_group_shop',
'ip_registration_newsletter',
'note',
'is_guest');
$fields = $this->customer->getFields();
foreach ($fields as $key => $value)
if (!in_array($key, $exclusion))
$this->customer->{$key} = key_exists($key, $_POST) ? trim($_POST[$key]) : 0;
}
if (isset($_POST['years']) && isset($_POST['months']) && isset($_POST['days']))
$this->customer->birthday = (int)($_POST['years']).'-'.(int)($_POST['months']).'-'.(int)($_POST['days']);