| Línea 215... |
Línea 215... |
| 215 |
foreach ($user as $attributekey => $attributevalue) {
|
215 |
foreach ($user as $attributekey => $attributevalue) {
|
| 216 |
// We explicitly want to ignore 'timemodified' attribute for checking, if an update is needed.
|
216 |
// We explicitly want to ignore 'timemodified' attribute for checking, if an update is needed.
|
| 217 |
if (!property_exists($currentrecord, $attributekey) || $attributekey === 'timemodified') {
|
217 |
if (!property_exists($currentrecord, $attributekey) || $attributekey === 'timemodified') {
|
| 218 |
continue;
|
218 |
continue;
|
| 219 |
}
|
219 |
}
|
| 220 |
if ($currentrecord->{$attributekey} != $attributevalue) {
|
220 |
if ($currentrecord->{$attributekey} !== $attributevalue) {
|
| 221 |
$changedattributes[$attributekey] = $attributevalue;
|
221 |
$changedattributes[$attributekey] = $attributevalue;
|
| 222 |
}
|
222 |
}
|
| 223 |
}
|
223 |
}
|
| 224 |
if (!empty($changedattributes)) {
|
224 |
if (!empty($changedattributes)) {
|
| 225 |
$changedattributes['timemodified'] = time();
|
225 |
$changedattributes['timemodified'] = time();
|
| Línea 428... |
Línea 428... |
| 428 |
$hiddenfields = array();
|
428 |
$hiddenfields = array();
|
| 429 |
} else {
|
429 |
} else {
|
| 430 |
$hiddenfields = array_flip(explode(',', $CFG->hiddenuserfields));
|
430 |
$hiddenfields = array_flip(explode(',', $CFG->hiddenuserfields));
|
| 431 |
}
|
431 |
}
|
| Línea 432... |
Línea -... |
| 432 |
|
- |
|
| 433 |
|
432 |
|
| 434 |
if (!empty($user->address) && (in_array('address', $userfields)
|
- |
|
| 435 |
&& in_array('address', $showuseridentityfields) || $isadmin)) {
|
433 |
if (!empty($user->address) && (in_array('address', $userfields) || $isadmin)) {
|
| 436 |
$userdetails['address'] = $user->address;
|
434 |
$userdetails['address'] = $user->address;
|
| 437 |
}
|
435 |
}
|
| 438 |
if (!empty($user->phone1) && (in_array('phone1', $userfields)
|
436 |
if (!empty($user->phone1) && (in_array('phone1', $userfields)
|
| 439 |
&& in_array('phone1', $showuseridentityfields) || $isadmin)) {
|
437 |
&& in_array('phone1', $showuseridentityfields) || $isadmin)) {
|