function password_policy_unblock in Password Policy 5
Unblocks the expired account
1 string reference to 'password_policy_unblock'
- password_policy_menu in ./
password_policy.module - Implementation of hook_menu().
File
- ./
password_policy.module, line 809
Code
function password_policy_unblock($uid = NULL) {
if ($uid) {
db_query("UPDATE {users} SET status = 1 WHERE uid = %d", $uid);
db_query("UPDATE {password_policy_expiration} SET unblocked = %d WHERE uid = %d", time(), $uid);
if ($account = user_load(array(
'uid' => $uid,
'status' => 1,
))) {
password_policy_send_login($account);
drupal_set_message(t('The user %name has been unblocked.', array(
'%name' => $account->name,
)));
}
}
drupal_goto('admin/user/password_policy/list_expired');
}