Kod
" ' . - _ ,
Wszystkie te znaki mi wywala i treść po nich.
public function action_settings() { $user = Auth::instance()->get_user(); if ($_POST) { $password = $this->request->post('password'); $password_c = $this->request->post('password_c'); $email = $this->request->post('email'); $company_telephone = $this->request->post('company_telephone'); { if ($password != $password_c) { $errors[] = 'Wpisane hasłą różnią się.'; } } { $errors[] = 'E-mail nie może być pusty.'; } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $errors[] = 'Podany adres e-mail nie jest poprawny.'; } { $errors[] = 'Telefon nie może być pusty.'; } { $editUser = ORM::factory('User')->where('id', '=', $user->id)->find(); { $editUser->password = $password; } $editUser->email = $email; $editUser->company_short_name = $this->request->post('company_short_name'); $editUser->company_name = $this->request->post('company_name'); $editUser->company_address = $this->request->post('company_address'); $editUser->company_postcode = $this->request->post('company_postcode'); $editUser->company_city = $this->request->post('company_city'); $editUser->company_nip = $this->request->post('company_nip'); $editUser->company_telephone = $company_telephone; $editUser->company_fax = $this->request->post('company_fax'); $editUser->save(); Flash::success('Dane poprawnie zaktualizowano.'); } else { foreach ($errors as $error) { Flash::warning($error); } } } $this->render(); }
$editUser->company_fax = $this->request->post('company_fax'); $editUser->save(); exit;