Commit f95462a2c138ec628c5eeccf161c9e01d0d9cb6c
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,7 +206,7 @@ class customers extends \db | ||
| 206 | 206 | ||
| 207 | public function UpdateData($data,$id) | 207 | public function UpdateData($data,$id) |
| 208 | { | 208 | { |
| 209 | - | 209 | + $pass = empty($data['password']) ? '' : 'passwd = :password,'; |
| 210 | return $this->exec( | 210 | return $this->exec( |
| 211 | ' | 211 | ' |
| 212 | UPDATE | 212 | UPDATE |
| @@ -214,7 +214,7 @@ class customers extends \db | @@ -214,7 +214,7 @@ class customers extends \db | ||
| 214 | SET | 214 | SET |
| 215 | name = :name, | 215 | name = :name, |
| 216 | email = :email, | 216 | email = :email, |
| 217 | - '.(!empty($data['password']) ? 'passwd = :password,' : '' ).' | 217 | + '.$pass.' |
| 218 | birth_date = :birth_date, | 218 | birth_date = :birth_date, |
| 219 | phone = :phone, | 219 | phone = :phone, |
| 220 | city = :city, | 220 | city = :city, |