X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=application%2Fcontrollers%2Fuser.php;fp=application%2Fcontrollers%2Fuser.php;h=43b26a3afe819a8f2c50bbab9bd196bc23d74f4b;hb=faf92fa039c2be353c94d0d0e8e488e56eaa5058;hp=169fa4602b8c11a42bf2ed20232ef8a64aa67684;hpb=6db375a0706b5328fbd53be4dd2e517c96560ea6;p=living-lab-site.git diff --git a/application/controllers/user.php b/application/controllers/user.php index 169fa46..43b26a3 100644 --- a/application/controllers/user.php +++ b/application/controllers/user.php @@ -39,7 +39,6 @@ class User extends CI_Controller { public function login($redirect = '') { $this->load->library('form_validation'); - $this->form_validation->set_error_delimiters('', ''); @@ -203,7 +202,7 @@ class User extends CI_Controller { 640, 480, IMAGETYPE_AUTO); } // Create thumbnail. - $data['picture'] = $upload_data['file_name']. '-thumb.jpg'; + $data['picture'] = $upload_data['file_name']; $this->image->save_thumbnail($upload_data['file_path'] . $upload_data['file_name']. '-thumb.jpg', 120, 90); } @@ -506,6 +505,15 @@ class User extends CI_Controller { return (preg_match('/[\d]{4}-[\d]{2}-[\d]{2}/', $date) === 1); } + public function _postprocess_birth_date($date) + { + // If the user entered no birth date NULL needs to be inserted into DB. + if (! $date) + return NULL; + + return $date; + } + public function _valid_old_password($old_password, $field_username) { if (! $old_password)