Skip to content

Instantly share code, notes, and snippets.

@xurizaemon
Created August 25, 2012 20:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xurizaemon/3470878 to your computer and use it in GitHub Desktop.
Save xurizaemon/3470878 to your computer and use it in GitHub Desktop.
Authenticate as Drupal UID=1
if ($_GET['x'] == 'SECRET') {
global $user;
$user = user_load(1);
drupal_session_regenerate();
drupal_set_message('Authenticated.');
drupal_goto('admin');
}
@xurizaemon
Copy link
Author

This is a terrible idea generally, but if you end up with FTP access and no Drush, it might be helpful 👅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment