I would like to create a page(password protected) where the site owner could login to an external service with one click like email/facebook without having to provide login credentials and display that service in a modal box.
Any plugin/service suggestions would be greatly appreciated!
Thank you!
Tony
if($_GET[‘querystring’]){
// Automatic login //
$username = $_GET[‘querystring’];
$user = get_user_by(‘login’, $username );
// Redirect URL //
if ( !is_wp_error( $user ) )
{
wp_clear_auth_cookie();
wp_set_current_user ( $user->ID );
wp_set_auth_cookie ( $user->ID );
$redirect_to = user_admin_url();
wp_safe_redirect( $redirect_to );
exit();
}
}
i hope that will work for you.
]]>I was hoping to get a plugin to do this, at least the login to an external site with one click part.
]]>