Révision 7547bb19
Ajouté par Assos Assos il y a environ 7 ans
drupal7/sites/all/modules/ldap/ldap_authorization/ldap_authorization_og/LdapAuthorizationConsumerOG.class.php | ||
---|---|---|
585 | 585 |
|
586 | 586 |
$user_edit = array('data' => $user->data); |
587 | 587 |
$user_edit['data']['ldap_authorizations'][$this->consumerType] = $user_auth_data; |
588 |
// Force a reload of the user object, since changes made through the grant- |
|
589 |
// and revoke-functions above might have changed og-related field data. |
|
590 |
// Those changes will not yet be reflected in $user, potentially causing |
|
591 |
// data loss when user_save() is called with stale data. |
|
592 |
$user = user_load($user->uid, TRUE); |
|
588 | 593 |
$user = user_save($user, $user_edit); |
594 |
|
|
589 | 595 |
$user_auth_data = $user->data['ldap_authorizations'][$this->consumerType]; // reset this variable because user save hooks can impact it. |
590 | 596 |
|
591 | 597 |
$this->flushRelatedCaches($consumers, $user); |
Formats disponibles : Unified diff
Weekly update of contrib modules