function drush_sitealias_is_remote_site

8.0.x drush_sitealias_is_remote_site($alias)
6.x drush_sitealias_is_remote_site($alias)
7.x drush_sitealias_is_remote_site($alias)
master drush_sitealias_is_remote_site($alias)

Determines whether a given site alias is for a remote site.


string $alias: An alias name or site specification.

Return value

bool Returns TRUE if the alias refers to a remote site, FALSE if it does not, or NULL is unsure.

3 calls to drush_sitealias_is_remote_site()
drush_browse in commands/core/
Command callback.
drush_sqlsync_sql_sync in commands/sql/
drush_user_login in commands/user/
Displays a one time login link for the given user.


includes/, line 1032
The site alias API.


function drush_sitealias_is_remote_site($alias) {
  if (!is_string($alias) || !strlen($alias)) {
    return NULL;

  $site_record = drush_sitealias_get_record($alias);
  if ($site_record) {
    if (!empty($site_record['remote-host'])) {
      return TRUE;
    else {
      return FALSE;
  else {
    drush_set_error('Unrecognized site alias.');