You are here

public static function MoAuthUtilities::drupal_is_cli in Google Authenticator / 2 Factor Authentication - 2FA 7

1 call to MoAuthUtilities::drupal_is_cli()
mo_auth_disable in ./mo_auth.install
Implements hook_disable().

File

classes/Utilities.php, line 467
This file is part of miniOrange 2FA module.

Class

MoAuthUtilities
@file This file is part of miniOrange 2FA module.

Code

public static function drupal_is_cli() {
  if (!isset($_SERVER['SERVER_SOFTWARE']) && (php_sapi_name() == 'cli' || is_numeric($_SERVER['argc']) && $_SERVER['argc'] > 0)) {
    return TRUE;
  }
  else {
    return FALSE;
  }
}