function tokenauth_reset in Token authentication 5
Same name and namespace in other branches
- 6.2 tokenauth.inc \tokenauth_reset()
- 6 tokenauth.inc \tokenauth_reset()
- 7 tokenauth.inc \tokenauth_reset()
Reset all tokens.
1 call to tokenauth_reset()
- tokenauth_reset_confirm_submit in ./
tokenauth.module - Handler for reset tokens confirmation
1 string reference to 'tokenauth_reset'
File
- ./
tokenauth.module, line 155
Code
function tokenauth_reset() {
$length = variable_get('tokenauth_length', 10);
$sql = 'SELECT uid FROM {users} WHERE uid > 0';
$result = db_query($sql);
while ($row = db_fetch_object($result)) {
$sql = "UPDATE {tokenauth_tokens} SET token = '%s' WHERE uid = %d";
db_query($sql, user_password($length), $row->uid);
}
}