function agreement_user_update in Agreement 7.2
Same name and namespace in other branches
- 8.2 agreement.module \agreement_user_update()
- 3.0.x agreement.module \agreement_user_update()
Implements hook_user_update().
File
- ./
agreement.module, line 148 - Agreement module code - agreement.module.
Code
function agreement_user_update(&$edit, &$account, $category = NULL) {
global $user;
$types = agreement_type_load();
foreach ($types as $name => $info) {
// Do not require user to re-accept agreement if they've just changed their
// password.
if ($info['settings']['frequency'] === 0 && !empty($edit['pass']) && $account->uid === $user->uid) {
agreement_agree($account, $name, 2);
}
}
}