function tokenauth_user in Token authentication 6
Same name and namespace in other branches
- 5 tokenauth.module \tokenauth_user()
- 6.2 tokenauth.module \tokenauth_user()
Implementation of hook_user().
File
- ./
tokenauth.module, line 156
Code
function tokenauth_user($op, &$edit, &$account, $category = NULL) {
switch ($op) {
case 'update':
if (isset($account->tokenauth_token)) {
tokenauth_reset_user($account->uid, $account->tokenauth_token);
}
break;
case 'insert':
tokenauth_insert($account->uid);
break;
case 'delete':
$sql = 'DELETE FROM {tokenauth_tokens} WHERE uid = %d';
db_query($sql, $account->uid);
}
}