Created
January 10, 2019 00:29
-
-
Save PabloWestphalen/203c0e79b13b5fbe00fbacfd56e5dc8b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Author: Pablo Westphalen | |
* | |
* http://www.github.com/PabloWestphalen | |
* | |
* | |
* Usage: place this file in wp root dir | |
* then access your WP_URL/logmein.php | |
*/ | |
require_once('wp-config.php'); | |
$admin = get_users(array("role" => "administrator")); | |
$admin = $admin[0]; | |
wp_clear_auth_cookie(); | |
wp_set_current_user ( $admin->ID ); | |
wp_set_auth_cookie ( $admin->ID ); | |
wp_redirect(get_dashboard_url()); | |
exit; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment