//determine WordPress user account to impersonate $user_login = 'guest'; //get user's ID $user = get_userdatabylogin($user_login); $user_id = $user->ID; //login wp_set_current_user($user_id, $user_login); wp_set_auth_cookie($user_id); do_action('wp_login', $user_login);
?> <script type="text/javascript">
window.location = "wp-admin/profile.php";
</script> <?php
No comments:
Post a Comment