You are here

function drush_tokenauth_reset_all in Token authentication 7

Same name and namespace in other branches
  1. 6.2 tokenauth.drush.inc \drush_tokenauth_reset_all()
  2. 6 tokenauth.drush.inc \drush_tokenauth_reset_all()

Drush command callback for "tokenauth-reset-all".

File

./tokenauth.drush.inc, line 85
Tokenauth drush commands.

Code

function drush_tokenauth_reset_all() {
  if (!drush_confirm(dt('Are you sure you want to reset all Token Authentication tokens?'))) {
    return;
  }
  $return = tokenauth_reset();
  if ($return !== FALSE) {
    drush_log(dt('Tokens have been reset.'), 'success');
    return;
  }
  drush_log(dt('Tokens failed to reset.'), 'error');
}