Commit f95462a2c138ec628c5eeccf161c9e01d0d9cb6c

Authored by Alex Savenko
1 parent ed27c2af

user update

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
src/lib/models/customers.php
... ... @@ -206,7 +206,7 @@ class customers extends \db
206 206  
207 207 public function UpdateData($data,$id)
208 208 {
209   -
  209 + $pass = empty($data['password']) ? '' : 'passwd = :password,';
210 210 return $this->exec(
211 211 '
212 212 UPDATE
... ... @@ -214,7 +214,7 @@ class customers extends \db
214 214 SET
215 215 name = :name,
216 216 email = :email,
217   - '.(!empty($data['password']) ? 'passwd = :password,' : '' ).'
  217 + '.$pass.'
218 218 birth_date = :birth_date,
219 219 phone = :phone,
220 220 city = :city,
... ...