Skip to content

Commit

Permalink
Add fallback URL to log in with WP credentials even after disabling W…
Browse files Browse the repository at this point in the history
…P login #35
  • Loading branch information
glena committed Jan 19, 2015
1 parent 1c7ecbf commit 157e990
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
2 changes: 2 additions & 0 deletions templates/auth0-login-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

if (trim($client_id) == "") return;

$wordpress_login_enabled = WP_Auth0_Options::get('wordpress_login_enabled') == 1;

$domain = WP_Auth0_Options::get('domain');
$cdn = WP_Auth0_Options::get('cdn_url');

Expand Down
4 changes: 1 addition & 3 deletions templates/login-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ function renderAuth0Form($canShowLegacyLogin = true, $specialSettings = array())
if(is_user_logged_in())
return;

$wordpress_login_enabled = WP_Auth0_Options::get('wordpress_login_enabled') == 1;

if (!$canShowLegacyLogin || !$wordpress_login_enabled || !isset($_GET['wle'])) {
if (!$canShowLegacyLogin || !isset($_GET['wle'])) {
require_once ('auth0-login-form.php');
}else{
add_action('login_footer', array('WP_Auth0', 'render_back_to_auth0'));
Expand Down

0 comments on commit 157e990

Please sign in to comment.