Skip to content

Instantly share code, notes, and snippets.

@c4rl

c4rl/gist:4035400

Created Nov 7, 2012
Embed
What would you like to do?
Drush login, Drush logout
# Drush login function dli
# ------------------------
#
# Open the given site in the browser, login as root, and go to destination
# argument. Requires the -l option, or drush site-set @alias, or $options['l']
# in sites/default/bashrc.php
#
# Usage
# -----
#
# # Simply login as root.
# $> dli
#
# # Login as root and go to /admin/content/node
# $> dli admin/content/node
#
function dli {
open `drush uli`/login?destination=$1
}
# Drush logout function dlo
# ------------------------
#
# Open the given site in the browser, logs out, and goes to destination argument.
# Requires the -l option, or drush site-set @alias, or $options['l'] in
# sites/default/bashrc.php
#
# Usage
# -----
#
# # Simply logout
# $> dlo
#
# # Logout and go to /admin/content/node
# $> dli admin/content/node
#
function dlo {
open http://`drush st --pipe | grep site_uri | replace site_uri= ''`/user/logout?destination=$1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.