tbenyon
Forum Replies Created
-
Forum: Plugins
In reply to: [External Login] activate userI’m not 100% sure about what your desired result is. I’ll say back what I think you want and you can let me know what I’ve got wrong.
1) You have a feature in your external system that allows users to be activated
2) This is achieved by changing the value of a field in your users table in the external database
3) You want users who are active in your external database to be able to login but users who are not to be blocked from logging into WordPress.You’ve said that you’ve got your WordPress site setup so that new users must be manually activated. This is not a default functionality in WordPress (as far as I am aware). Is this something custom you’ve written or a plugin you are using? You talk about manually activating users? How does this system work?
This does sound like a very custom setup but I might be misunderstanding something?
Hey @lorzinian,
It sounded like you found a different solution so I’m going to mark this as resolved for now.
If you need more help with this please let me know and I’ll re-open it.
Thanks,
Tom 🙂
Forum: Plugins
In reply to: [External Login] fatal errorHey Paul,
Thanks for the details. It’s really helpful.
I’ll try and refactor this code ASAP and push an update.
I’ll leave this ticket open until a fix is deployed.
I saw you’ve written another couple of support questions and I’ll try and get to those as soon as I can.
Thanks,
Tom
Forum: Plugins
In reply to: [External Login] fatal errorHey @xprojectsx,
I can’t replicate this straight away. Can you confirm which version of PHP you are running?
My theory at the moment (just a guess) is that you are using a version of PHP older than the plugin currently supports and it doesn’t like the way I’ve nested a function in a function.
function exlog_modify_repeater_data_for_view_use($repeater_data) { function exlog_modify_repeater_item_data_for_view_use($repeater_data) { $formatted_data = array(); if (is_array($repeater_data)) { foreach ($repeater_data as $repeater_item_data) { $formatted_repeater_items_data = array(); foreach ($repeater_item_data as $repeater_item_datum) { if ($repeater_item_datum['repeater_field']) { $value = exlog_modify_repeater_item_data_for_view_use($repeater_item_datum['value']); } else { $value = $repeater_item_datum['value']; } $formatted_repeater_items_data[$repeater_item_datum['name']] = $value; } array_push($formatted_data, $formatted_repeater_items_data); } return $formatted_data; } else { return $repeater_data; } } return exlog_modify_repeater_item_data_for_view_use($repeater_data); }I am guessing each time
exlog_modify_repeater_data_for_view_use()is run it is trying to redeclareexlog_modify_repeater_item_data_for_view_use().The issue is in the following file:
/wp-content/plugins/external-login/options/wpconfig_options.phpIf your able to, you could test if this theory is correct by modifying the code to this:
function exlog_modify_repeater_item_data_for_view_use($repeater_data) { $formatted_data = array(); if (is_array($repeater_data)) { foreach ($repeater_data as $repeater_item_data) { $formatted_repeater_items_data = array(); foreach ($repeater_item_data as $repeater_item_datum) { if ($repeater_item_datum['repeater_field']) { $value = exlog_modify_repeater_item_data_for_view_use($repeater_item_datum['value']); } else { $value = $repeater_item_datum['value']; } $formatted_repeater_items_data[$repeater_item_datum['name']] = $value; } array_push($formatted_data, $formatted_repeater_items_data); } return $formatted_data; } else { return $repeater_data; } } function exlog_modify_repeater_data_for_view_use($repeater_data) { return exlog_modify_repeater_item_data_for_view_use($repeater_data); }If you could still let me know which version of PHP or even better, if you’re running a lower version than the currently supported “5.6.34 or higher” to up your version.
Thanks,
Tom
Forum: Plugins
In reply to: [External Login] Password resettingHey John,
The plugin has been designed so that the external database is the central source of information and we’re just allowing access (and updating information) based on the external database. Essentially a one way link from External DB to WordPress.
It would be possible to make two way links but this is not only a big feature for adding now, but I can see it adding a lot of work for additional features that I have in mind. This is not to say I won’t do it because I can see this being useful for users.
I’m mostly writing this so I can think about the work involved for my self but my initial thoughts on the work required to do this would be:
– Update the test button to also do an ‘insert’ query to ensure the db user has permission to do such queries
– Add a tick box in the admin area to allow password resets to modify the External DB from WP
– Hook into the standard WP password reset functionality to attempt to update the external DB at password update time
– Hook into the admin area password change and attempt to update the external DB first
– If the external db update fails block the changes to passwords in WP
– Decide if other details from the admin page should be able to update the External Database – If so, do I need to add a section to the admin area that would allow the user to choose which details can be updated? – Do I then need to block other details from appearing in the WP admin area for change?I very much welcome any thoughts, opinions or anything I’ve missed above.
I wouldn’t expect to get round to this this month as I have other features in the backlog that I’m also working on. I have added this to the Trello board though and will keep this thread open to update you.
Your second query about being bombarded with e-mails is new to me but I can understand why this is happening. I’m updating the user details every time a user logs in which is what will be causing this. This is definitely a bug on my end rather than a new feature so I will push this up the Trello board as this sounds very annoying. Apologies for missing this but I don’t have e-mail set up on my dev environment so it was missed.
Any questions, feel free to get back to me John 🙂
Thanks,
Tom
Forum: Plugins
In reply to: [External Login] Active/Inactive UsersOooooh That second link sounds awesome!
It’s on my Trello board! If you have a hard deadline you’d need this by let me know and I can tell you whether it’s feasible.
Tom
Forum: Plugins
In reply to: [External Login] Change Username, Email in External DBGreat point @johnfisher2!
If it’s just an e-mail address that your external system uses for logging in you can make that the “username” field as well as the e-mail field in table mapping.
The thing the plugin doesn’t support is the ability to log in with either username or password for your users.
My initial thought was this is not abnormal but I then remembered WordPress does support this and asks for “Username or Email Address” in the default login screen.
I’ve started planning how I’ll solve this.
Will try and keep progress updates in this thread but let me know if you’ve got a deadline you need to meet as I feel this is something I should have thought about.
Forum: Reviews
In reply to: [External Login] Plugin works great.Really appreciate you taking the time to write a review!
Thank you! 😊
Forum: Plugins
In reply to: [External Login] Change Username, Email in External DBHey @rjjacob,
I think I know what the e-mail problem is! My plugin only allows you to login with a username at the moment.
This means that you must have used the username once to get the user across in the first place. Then, when using e-mail to login, it is falling back to use the local WordPress database for logging in and thus not getting new data from the external one.
I will make e-mail addresses work for you for logging in in my next release.
Do you have a deadline for when you need this by?
Thanks,
Tom
Forum: Plugins
In reply to: [External Login] Active/Inactive UsersHey Panos,
I had a look at getting MS SQL setup once but struggled to see how to get a local version working on my Mac so I could do testing. I don’t suppose you’ve done this before or know of a free service I could use to do some testing on? (Don’t give me access to something you own as this breaks WP code of practice).
If you’re still keen to use the plugin I’ll have another look at this!
Regarding he 999 Error, this should only happen if you click the test button. Is that what made it appear?
Thanks,
Tom
Forum: Plugins
In reply to: [External Login] Primary and secondary user roles supportHey John,
I had a think about it and is it was not going to take too long I found the time to add it to the latest release V1.5.0. This is now live.
No beer required but I’d be VERY grateful if you could take the time to write a review.
If you have any issues with it let me know,
Thanks John,
Tom
Forum: Plugins
In reply to: [External Login] Database Table Mapping-where conditionHey @volt74,
I’ve got a working prototype relating to this. This allows you to give the name of a field and a set of values for that field that would block a user.
For example, I want to look in the “status” field and block any users who’s status is “blocked” or “sat out”.
Would you be able to help by downloading the code from GitHub and testing it before I make it live?
Any feedback would be very welcome!
If this isn’t possible – it’s no problem 🙂
Next I’m going to make it so that certain roles can block login also.
Tom
Forum: Plugins
In reply to: [External Login] Active/Inactive UsersHey @anemos2k,
I’ve got a working prototype relating to this. This allows you to give the name of another field that and a set of values for that field that would block a user.
For example, I want to look in the “status” field and block any users who’s status is “blocked” or “sat out”.
Would you be able to help by downloading the code from GitHub and testing it before I make it live?
Any feedback would be very welcome!
If this isn’t possible – it’s no problem 🙂
Next I’m going to make it so that certain roles can block login also.
Tom
Hey @lorzinian,
Although familiar with other AWS services, I’ve not seen this one before. Looks cool.
I’ve had a read of the documentation and the short answer is, not at the moment.
It would be possible to add this integration however I’ve already got a few feature requests that I’m working through. Because this is a project I do as a free service on the side it may take some time before that feature is created. This may well be after your project requires it to be ready.
It looks like you may have found a plugin that does what you need though?
I don’t know anything about Amazon Cognito so I’ll read up on it and get back to your shortly with an answer.
Tom