Skip to content

Commit

Permalink
Fixed Mixed content warning #75 & added login action for issue #76 #77
Browse files Browse the repository at this point in the history
  • Loading branch information
glena committed Jun 10, 2015
1 parent d0d8238 commit 586254e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion WP_Auth0.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public static function wp_enqueue(){
wp_enqueue_script('jquery');
}

wp_enqueue_style( 'auth0-widget', WPA0_PLUGIN_URL . 'assets/css/main.css' );
wp_enqueue_style( 'auth0-widget', trailingslashit(plugin_dir_url(__FILE__) ) . 'assets/css/main.css' );
}

public static function shortcode( $atts ){
Expand Down Expand Up @@ -558,6 +558,9 @@ public static function login_user( $userinfo, $id_token ){
// User exists! Log in
self::updateAuth0Object($userinfo);
wp_set_auth_cookie( $user->ID );

do_action( 'auth0_user_login' , $user->ID, $userinfo, false, $id_token );

return true;
} else {

Expand All @@ -566,6 +569,8 @@ public static function login_user( $userinfo, $id_token ){
$user_id = $creator->create($userinfo, $id_token);

wp_set_auth_cookie( $user_id );

do_action( 'auth0_user_login' , $user_id, $userinfo, true, $id_token );
}
catch (WP_Auth0_CouldNotCreateUserException $e) {
$msg = __('Error: Could not create user.', WPA0_LANG);
Expand Down

0 comments on commit 586254e

Please sign in to comment.