Skip to content

Instantly share code, notes, and snippets.

@shamsher327
Created February 19, 2019 04:45
Show Gist options
  • Save shamsher327/45b7a453b11bae48ab609fd6496d18df to your computer and use it in GitHub Desktop.
Save shamsher327/45b7a453b11bae48ab609fd6496d18df to your computer and use it in GitHub Desktop.
Admin User login with code
$uid = '1';
$user = Drupal\user\Entity\User::load( $uid );
user_login_finalize( $user );
$response->send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment