Forum Replies Created

Viewing 15 replies - 526 through 540 (of 572 total)
  • Plugin Author tbenyon

    (@tbenyon)

    I haven’t heard back from you so I’m going to mark this as resolved. Feel free to open this back up if you want to discuss it further or need any more help ??

    Thanks,

    Tom ??

    Plugin Author tbenyon

    (@tbenyon)

    Hi @ecommercenary,

    Sincere apologies for not getting back to you sooner. This is just a side project for me and life has got in the way – apologies if that has caused an inconvenience for you.

    I’ve been thinking about the issue you discussed and how best to write something that will be of use to more than just your use case. The truth of the matter is that I am probably best showing you how you could use the same credentials to query the data.

    This is only a brief over view because I think what you’re actually looking for is a completely unique system to retrieve and work with data which is ofcourse beyond the scope of this plugin or support. However, I’m trying to help you out below by putting you in the right direction.

    First of all the only thing that is shared between the External Login plugin and your ability to access other data from the database is the information you provide the plugin to be able to connect to the database.

    You can use the exlog_get_option() to get this data and you could write the following function to make SQL queries to get your data like so:

    
    function ecommercenary_get_data($query_string) {
        $host = exlog_get_option("external_login_option_db_host");
        $port = exlog_get_option("external_login_option_db_port");
        $user = exlog_get_option("external_login_option_db_username");
        $password = exlog_get_option("external_login_option_db_password");
        $dbname = exlog_get_option("external_login_option_db_name");
    
        $host .= ":" . $port;
    
        $db_instance = new wpdb(
            $user,
            $password,
            $dbname,
            $host
        );
    
        return $db_instance->get_results($query_string, ARRAY_A);
    }
    
    $sql_query_string = "SELECT * FROM USERS;";
    $my_array_of_data = ecommercenary_get_data($sql_query_string);
    

    Let me know if this helps.

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey @emeraldsanctum,

    This is a very specific use case. I don’t know why you’ve got a system that stores the username with the password but this is certainly not typical practice.

    If I understand correctly, you are concatenating username, a colon and the password and then using a SHA1 hash on that entire string? If this is true, I imagine this has be done to prevent rainbow attacks by using the username and colon as a salt when you hash the password. Not helpful now, but I would recommend that the old system should be using BCRYPT as this will not only handle generating unique salts but is also using a slow algorithm to protect against brute force attacks.

    I don’t really want to clutter the settings of the plugin and do the extra work for a single use case.

    However I would like to offer you a simple solution. If you’re happy to add a single line of code to the plugin you could make this work for just your build.

    The reason I wouldn’t want to do this if I were in your shoes is that as soon as the plugin is updated you would lose this change and have to re-add it. If the core functionality of the file changed in a future update this could also break the system.

    However, if you set the plugin to use the SHA1 hash with no salt and then in the file wordpress_external_login_plugin/login/db.php before the line . . .

    $valid_credentials = exlog_validate_password($password, $userData->{$db_data["dbstructure_password"]}, $user_specific_salt);

    . . . you could add a line something like this . . .

    $password = strtoupper(esc_sql($username)) . ":" . $password;.

    If you’re comfortable with development you could always fork the project from it’s public repository on github: https://github.com/tbenyon/wordpress_external_login_plugin

    You’d have your own copy of the plugin then.

    If you were really keen for this functionality and wanted to make a reasonable donation I’ll look at putting hidden functionality in for you to the actual plugin.

    I’m happy to discuss this further if you think I’m being unreasonable but I think this is a one off use case that is specific to your needs.

    Thanks,

    Tom

    ??

    Plugin Author tbenyon

    (@tbenyon)

    Thanks for taking the time to review. It’s really appreciated.

    ??

    Plugin Author tbenyon

    (@tbenyon)

    Hey @ecommercenary,

    Just to clarify, your client has an iOS app. That app has it’s own login system. I’m presuming that login system doesn’t use OAuth.

    The login system has users stored in a DB that you can access.

    You’ve said you’ll need to reflect a few more ‘activities’.

    I presume by this you mean you need to access more data than just login from the external database.

    I presume this data is stored in multiple tables?

    Do you want to just get a bulk amount of data at the beginning of the login session or will you be accessing it as the session continues?

    Sorry about all the questions but I just want to make sure I understand your situation before advising.

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Cool, I’m a bit busy for a week but will get round to it for you. I won’t be offended if you chase me so feel free to message me in 1-2 weeks to see if I’ve made progress but I’ll try and keep you posted.

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey @volt74,

    I can have a look at adding this functionality for you.

    I’d only ask that once completed if you could kindly write me a review.

    Will start looking at this now but will keep you posted on when it will be completed.

    Would this functionality be useful for you by a specific date? I can’t promise anything but it’d be good to know.

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey @zenkenstein,

    Brilliant news ??

    PLEASE could you write a review??? ?? ?? ??

    Plugin Author tbenyon

    (@tbenyon)

    Hey @zkenstein,

    Glad to hear you’ve got the connection working. Sounds like when you click the test button now you can see some example data which is great.

    Do you have Enable External Login check box ticked under Functionality Settings section?

    If yes the next thing to check is your hashing method and field mapping.

    The column data does not need to be the same as WordPress data. However, in the Database Table Mapping section, you must fill in the field (column) names of your external database. These are CaSe SeNsItIvE so make sure you get capital letters in the correct spaces.

    If this appears correct the next thing to check is your Password Hashing method. Do you have knowledge of what password hashing is? Do you know what hashing algorithm has been used to safely store your passwords in the external database?

    I presume your passwords are hashed and if not, they really should be for the security of the users on the external database.

    If you’re not familiar with this, my FAQ question “What hashes are available and which does my external database use?” may help.

    Let me know how you get on. Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey @zkenstein,

    I’m glad you’ve got it working ??

    The host does not need to be on the same server but you will of course need to make sure that the server the site is hosted on is allowed access to the database server.

    The ‘Host’ setting is under the ‘Database Connection’ section in the settings menu.

    I hope this helps. If you have any more issues please get back to me. Otherwise I’d be very grateful if you could write me a quick review ?? ?? ??

    Thanks @zkenstein,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hi @zkenstein,

    Is this on first use of the plugin or is this following an update?

    I presume this is when using the test button?

    What type of database have you selected? If you’re trying to use a Postgres DB it is a mistake my end as I’ve just realised I have to do a little update to the test button, however the connection should work.

    If you could get back to me on this that’d be great. I’m going to try and get the test button functionality updated to work with Postgres today on my lunch break but also to give more output to help me solve your problem.

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Thank you for the review. I’m glad the plugin is of use to you!

    Plugin Author tbenyon

    (@tbenyon)

    Thanks @orion457.

    If you are ok to give me my first review I’d be very grateful!

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey @orion457,

    I’ve now deployed this live to here (www.ads-software.com).

    If you could test it and leave a review I’d be very grateful!

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey @orion457,

    I think I’ve got it working ??

    If you are able to download the plugin in this feature branch and test it that’d be great.
    https://github.com/tbenyon/wordpress_external_login_plugin/tree/feature/post-gres-support

    Here is the direct download link to the ZIP if this is easier:
    https://github.com/tbenyon/wordpress_external_login_plugin/archive/feature/post-gres-support.zip

    Please let me know if it works for you as I’ll deploy it.

    If there are any issues get back to me with as much detail as possible.

    Thanks,

    Tom

Viewing 15 replies - 526 through 540 (of 572 total)