stezter
Forum Replies Created
-
Forum: Plugins
In reply to: [Data Tables Generator by Supsystic] External Database ConnectionsThe lack of any ticket tracking on your site is very poor.
I will fill in you Contact Form again (with reference to this ticket) and request a refund. Your website over-states the capability of your plugin specifically with reference to external databases …
“The plugin works on any engine supported by WordPress: MySQL or any other one.”
Clearly this is a false statement and I was forced to purchase the PRO version in order to test functionality that it’s clearly not capable of.
Forum: Plugins
In reply to: [Data Tables Generator by Supsystic] External Database ConnectionsWhat “Internal Support” ?
Contact Us is all you have in your website. No mechanism to see open tickets or communicate is a support thread.What instructions can you provide so that I can get support ?
Forum: Plugins
In reply to: [Data Tables Generator by Supsystic] External Database ConnectionsHave tired to Contact Supsystic via their channels but no responses, no support, nothing.
I want a refund!
Forum: Plugins
In reply to: [Data Tables Generator by Supsystic] is There a support after the sell ?I am in the same position.
Forced to go Pro to release functionality. Functionality doesn’t work and absolutely no support.
I want my money back too!
Forum: Plugins
In reply to: [External Login] Bypass ExternalDB for WordPress AdminAnd ….
Bingo! He’s nailed it.
Thank you Tom. Everything working.
Fabulous Support!!!
Best
SteveForum: Plugins
In reply to: [External Login] Bypass ExternalDB for WordPress AdminTom
This is probably a result of your infrastructure challenges. Drink more heavily and it’ll all come good. I’ve sent you beers.
A pint of Guinness for me when you’re next up lad.
Regards
SteveForum: Plugins
In reply to: [External Login] Bypass ExternalDB for WordPress AdminEeeuch!!
My site’s not happy with you.
New db.php causes “There has been a critical error on your website”.
New autheticate.php prevents admin login whether user exists on external db or not.Had to revert. ??
Steve
Forum: Plugins
In reply to: [External Login] Bypass ExternalDB for WordPress AdminAh yes, MS SQL. I should have said.
Of course I’ll test it.
If you send me the codes snippets here, as you did before, that works fine for me.
Thanks Tom
SteveForum: Plugins
In reply to: [External Login] Bypass ExternalDB for WordPress AdminHere you go Tom.
Extract trying to login when user does not exist in external database but does exist in local wordpress database. It clearly blocking the local login but that’s not what my settings say.
[27-Oct-2020 21:39:19 UTC] – – – – – – – – EXLOG DEBUG START – – – – – – – –
[27-Oct-2020 21:39:19 UTC] — Exlog – Check 1
[27-Oct-2020 21:39:19 UTC] false
[27-Oct-2020 21:39:19 UTC] 10
[27-Oct-2020 21:39:19 UTC] — Exlog – Check 2
[27-Oct-2020 21:39:19 UTC] 10
[27-Oct-2020 21:39:19 UTC] false
[27-Oct-2020 21:39:19 UTC] — Exlog – Auth response
[27-Oct-2020 21:39:19 UTC] array (
‘valid’ => false,
)
[27-Oct-2020 21:39:19 UTC] PHP Notice: Undefined index: role in /home/mothertechco/dev/wp-content/plugins/external-login/login/authenticate.php on line 21
[27-Oct-2020 21:39:19 UTC] — Exlog – Roles
[27-Oct-2020 21:39:19 UTC] array (
0 => ‘subscriber’,
)
[27-Oct-2020 21:39:19 UTC] — Exlog – Block access due to role?
[27-Oct-2020 21:39:19 UTC] false
[27-Oct-2020 21:39:19 UTC] — Exlog – In user found
[27-Oct-2020 21:39:19 UTC] PHP Notice: Undefined index: exlog_authenticated in /home/mothertechco/dev/wp-content/plugins/external-login/login/authenticate.php on line 43
[27-Oct-2020 21:39:19 UTC] — Exlog – In Not authenticated
[27-Oct-2020 21:39:19 UTC] — Exlog – Should block local login?
[27-Oct-2020 21:39:19 UTC] true
[27-Oct-2020 21:39:19 UTC] false
[27-Oct-2020 21:39:19 UTC] true
[27-Oct-2020 21:39:19 UTC] — Exlog – BLOCKING local login
[27-Oct-2020 21:39:19 UTC] – – – – – – – – EXLOG DEBUG END – – – – – – – –Forum: Plugins
In reply to: [External Login] Mapping Additional FieldsTom
That’s straight forward.
I wasn’t doubtful that you’d provide a resolution. Let me know when you’re done and I’ll send you some more beers.
Cheers
SteveForum: Plugins
In reply to: [External Login] Bypass ExternalDB for WordPress AdminThanks Tom
I think we’re going to have to spit out some logs. The user admin doesn’t exist in the external database and in that scenario I cannot login to WP with the admin account. If I add the admin user to the external database I can.
I have nothing set to disable local logins.
Steve
Forum: Plugins
In reply to: [External Login] Mapping Additional FieldsHi Tom
Yes, the fields I need to pull across are all in the same table.
I need to pull across external fields (UserID, CompanyID) and map them to WP fields (sunrise_userid, sunrise_companyid) respectively. I probably need a few more but if I saw the code for these then I could add additional ones myself.
Thanks Tom
Regards
SteveForum: Plugins
In reply to: [External Login] Bypass ExternalDB for WordPress AdminI tell a lie Tom, it’s not working.
An existing wp user can now login but an an external user with no wp account cannot.
Aghhh!
Forum: Plugins
In reply to: [External Login] Bypass ExternalDB for WordPress AdminTom
I did what you suggested but no change. I have dissected the exlog_auth function to the best of my ability and do seem to now have it working. Of course I could have broken the function in other ways. Can you check what I’ve done? It’s all just parenthesis towards the end of the function
<?php
function exlog_auth( $user, $username, $password )
{
$migration_mode = exlog_get_option(‘external_login_option_migration_mode’) == “on”;// If not in migration mode or you are in migration mode and the username isn’t in the WordPress DB
if (!$migration_mode || ($migration_mode && !username_exists($username)))
{// Make sure a username and password are present for us to work with
if ($username == ” || $password == ”) return;$response = exlog_auth_query($username, $password);
$roles = exlog_map_role($response[‘role’]);
$block_access_due_to_role = true;
foreach ($roles as $role)
{
if ($role != EXLOG_ROLE_BLOCK_VALUE)
{
$block_access_due_to_role = false;
}
}// If a user was found
if ($response)
{// If role is blocking user access
if ($block_access_due_to_role)
{
$user = new WP_Error(‘denied’, __(“You are not allowed access”));
}// If user was NOT authenticated
else if (!($response[“exlog_authenticated”]))
{
// User does not exist, send back an error message
$user = new WP_Error(‘denied’, __(“Invalid username or password”));
}// If user was authenticated
else if ($response[“exlog_authenticated”])
{
// External user exists, try to load the user info from the WordPress user table
$userobj = new WP_User();
$user = $userobj->get_data_by(‘login’, $response[‘username’]); // Does not return a WP_User object ??
$user = new WP_User($user->ID); // Attempt to load up the user with that ID$exlog_userdata = array(
‘user_login’ => $response[‘username’],
‘first_name’ => $response[‘first_name’],
‘last_name’ => $response[‘last_name’],
‘user_pass’ => $password,
‘role’ => $roles[0],
‘user_email’ => $response[’email’],
);// If user does not exist
if ($user->ID == 0)
{
// Setup the minimum required user information
$new_user_id = wp_insert_user( $exlog_userdata ); // A new user has been created// Load the new user info
$user = new WP_User ($new_user_id);
}
else
{
$exlog_userdata[‘ID’] = $user->ID;
add_filter(‘send_password_change_email’, ‘__return_false’); // Prevent password update e-mail
wp_update_user($exlog_userdata);
}$user->set_role($roles[0]); // Wipe out old roles
// Add roles to user if more than one
foreach ($roles as $role)
{
$user->add_role($role);
}// Hook that passes user data on successful login
do_action(‘exlog_hook_action_authenticated’, $user, $exlog_userdata);
}
}// Whether to disable login fallback with the local WordPress version of the username and password
// Prevents local login if:
// – Disable local login is set in the admin area
// – OR
// – The user was found but the password was rejected
if (exlog_get_option(‘external_login_option_disable_local_login’) == “on” || is_wp_error($user))
{
remove_action(‘authenticate’, ‘wp_authenticate_username_password’, 20);
}return $user;
}if (exlog_get_option(“external_login_option_enable_external_login”) == “on”)
{
add_filter(‘authenticate’, ‘exlog_auth’, 10, 3);
}}
Forum: Plugins
In reply to: [External Login] Bypass ExternalDB for WordPress AdminHi Tom
Thanks for your input and suggestions.
I am not in migration mode and do not have disable local Login set. For your info I am running WordPress 551 and PHP 7.3.
I’ll take a look at your code snippet and see what I can achieve with it.
Thanks
Steve