| @@ 283-290 (lines=8) @@ | ||
| 280 | // reset usermapper and copy in valid data |
|
| 281 | $mapper->load(['uuid = ?', $data['uuid']]); |
|
| 282 | $mapper->copyfrom($data); |
|
| 283 | if ($mapper->save()) { |
|
| 284 | $this->notify(_('The config data was updated!'), 'success'); |
|
| 285 | } else { |
|
| 286 | $this->notify(_('Unable to update config data!'), 'error'); |
|
| 287 | $f3->set('form', $f3->get('REQUEST')); |
|
| 288 | echo \View::instance()->render($view); |
|
| 289 | return; |
|
| 290 | } |
|
| 291 | ||
| 292 | $f3->reroute('@admin_config_search' . '?search=' . $mapper->uuid); |
|
| 293 | } |
|
| @@ 400-407 (lines=8) @@ | ||
| 397 | // reset usermapper and copy in valid data |
|
| 398 | $mapper->load(['uuid = ?', $mapper->uuid]); |
|
| 399 | $mapper->copyfrom($data); |
|
| 400 | if ($mapper->save()) { |
|
| 401 | $this->notify(_('The config data was updated!'), 'success'); |
|
| 402 | } else { |
|
| 403 | $this->notify(_('Unable to update config data!'), 'error'); |
|
| 404 | $f3->set('form', $f3->get('REQUEST')); |
|
| 405 | echo \View::instance()->render($view); |
|
| 406 | return; |
|
| 407 | } |
|
| 408 | ||
| 409 | $f3->reroute('@admin_config_edit' . '?uuid=' . $mapper->uuid); |
|
| 410 | } |
|
| @@ 213-220 (lines=8) @@ | ||
| 210 | // reset usermapper and copy in valid data |
|
| 211 | $mapper->load(['uuid = ?', $data['uuid']]); |
|
| 212 | $mapper->copyfrom($data); |
|
| 213 | if ($mapper->save()) { |
|
| 214 | $this->notify(_('The report data was updated!'), 'success'); |
|
| 215 | } else { |
|
| 216 | $this->notify(_('Unable to update report data!'), 'error'); |
|
| 217 | $f3->set('form', $f3->get('REQUEST')); |
|
| 218 | echo \View::instance()->render($view); |
|
| 219 | return; |
|
| 220 | } |
|
| 221 | ||
| 222 | $f3->reroute('@admin_reports_search' . '?search=' . $mapper->uuid); |
|
| 223 | } |
|
| @@ 348-355 (lines=8) @@ | ||
| 345 | // reset usermapper and copy in valid data |
|
| 346 | $mapper->load(['uuid = ?', $mapper->uuid]); |
|
| 347 | $mapper->copyfrom($data); |
|
| 348 | if ($mapper->save()) { |
|
| 349 | $this->notify(_('The report data was updated!'), 'success'); |
|
| 350 | } else { |
|
| 351 | $this->notify(_('Unable to update report data!'), 'error'); |
|
| 352 | $f3->set('form', $f3->get('REQUEST')); |
|
| 353 | echo \View::instance()->render($view); |
|
| 354 | return; |
|
| 355 | } |
|
| 356 | ||
| 357 | $f3->reroute('@admin_reports_search' . '?search=' . $mapper->uuid); |
|
| 358 | } |
|
| @@ 234-241 (lines=8) @@ | ||
| 231 | // reset usermapper and copy in valid data |
|
| 232 | $usersMapper->load(['uuid = ?', $data['uuid']]); |
|
| 233 | $usersMapper->copyfrom($data); |
|
| 234 | if ($usersMapper->save()) { |
|
| 235 | $this->notify(_('The account was updated!'), 'success'); |
|
| 236 | } else { |
|
| 237 | $this->notify(_('Unable to update your account!'), 'error'); |
|
| 238 | $f3->set('form', $f3->get('REQUEST')); |
|
| 239 | echo \View::instance()->render($view); |
|
| 240 | return; |
|
| 241 | } |
|
| 242 | ||
| 243 | $f3->reroute('@admin_users_search' . '?search=' . $usersMapper->uuid); |
|
| 244 | } |
|
| @@ 273-280 (lines=8) @@ | ||
| 270 | // reset usermapper and copy in valid data |
|
| 271 | $mapper->load(['uuid = ?', $data['uuid']]); |
|
| 272 | $mapper->copyfrom($data); |
|
| 273 | if ($mapper->save()) { |
|
| 274 | $this->notify(_('The account data was updated!'), 'success'); |
|
| 275 | } else { |
|
| 276 | $this->notify(_('Unable to update account data!'), 'error'); |
|
| 277 | $f3->set('form', $f3->get('REQUEST')); |
|
| 278 | echo \View::instance()->render($view); |
|
| 279 | return; |
|
| 280 | } |
|
| 281 | ||
| 282 | $f3->reroute('@admin_usersdata_search' . '?search=' . $mapper->uuid); |
|
| 283 | } |
|
| @@ 409-416 (lines=8) @@ | ||
| 406 | // reset usermapper and copy in valid data |
|
| 407 | $mapper->load(['uuid = ?', $mapper->uuid]); |
|
| 408 | $mapper->copyfrom($data); |
|
| 409 | if ($mapper->save()) { |
|
| 410 | $this->notify(_('The account data was updated!'), 'success'); |
|
| 411 | } else { |
|
| 412 | $this->notify(_('Unable to update account data!'), 'error'); |
|
| 413 | $f3->set('form', $f3->get('REQUEST')); |
|
| 414 | echo \View::instance()->render($view); |
|
| 415 | return; |
|
| 416 | } |
|
| 417 | ||
| 418 | $f3->reroute('@admin_usersdata_edit' . '?uuid=' . $mapper->uuid); |
|
| 419 | } |
|
| @@ 244-251 (lines=8) @@ | ||
| 241 | // reset usermapper and copy in valid data |
|
| 242 | $usersMapper->load(['uuid = ?', $data['uuid']]); |
|
| 243 | $usersMapper->copyfrom($data); |
|
| 244 | if ($usersMapper->save()) { |
|
| 245 | $this->notify(_('Your account was updated!'), 'success'); |
|
| 246 | } else { |
|
| 247 | $this->notify(_('Unable to update your account!'), 'error'); |
|
| 248 | $f3->set('form', $f3->get('REQUEST')); |
|
| 249 | echo \View::instance()->render($view); |
|
| 250 | return; |
|
| 251 | } |
|
| 252 | ||
| 253 | // send verification email if email change - non-fatal |
|
| 254 | if ($usersMapper->email !== $oldUserMapper->email) { |
|