• Resolved George Moureau

    (@georgepiccexcellencecom)


    We’re converting our site to a WordPress front end with a mysql backend. We provide online training for vascular nurses and clinicians which comes with CE credits for courses completed. All of that is managed through a mysql database.

    Marketing wants to control the page copy and look which is fine. They will use WordPress CMS to do as they please with the look of the site. Everything works. While the back end is not managed through the CMS we can match the look through separate css.

    My only issue is how to let the WordPress front end know when a customer is logged into the mysql backend. I know WP uses cookies for this, can I direct it to specific cookies generated by our login program?

    Just looking for ideas on this.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m a little confused. MySQL is a database system and has nothing to do with “login” or “CSS”. There are only records in the database and you can query them – nothing more.

    I have a guess what you are about:
    You have the wordpress installation with its own database. And you have a separate database next to it whose data you want to access. For the latter, you would need a custom plugin that allows you to access this database from within WordPress.

    If I have misunderstood, please describe in more detail what you have before dirt.

    Moderator bcworkz

    (@bcworkz)

    There’s no way an external app could generate a usable WP auth cookie. Only WP can do that. It is feasible to override the WP authentication scheme to allow some external process to validate the user login. Users still would need to login separately in each case, but authentication is handled in one place so any account changes are automatically utilized in either location.

    It’s also feasible to send WP a certain HTTPS request that would cause a user to become logged in. This would be a custom coded solution. The request and subsequent handshake exchange would need to be very carefully designed to ensure adequate security. I’m thinking something like an oAuth exchange.

    There are a few single sign on (SSO) plugins that might meet your needs. The critical need would be for SSO to be compatible with the external system.

    Thread Starter George Moureau

    (@georgepiccexcellencecom)

    Yes, mysql is a database, we’re using MariaDB specifically. To clarify, We have customer login information stored in a mysql database. When a customer logs in, their login id and password are validated against values stored in the database. When their login information is validated, cookies are created for use during their stay on our website and removed once they’re done. Essentially all activities, course access, tests,etc., are performed during their session are supported through the database and has nothing to do with WordPress. As I mentioned, the WordPress side simply provides the front end look.

    Moderator bcworkz

    (@bcworkz)

    For what purpose does WP front end need to know about users logged into this other backend? Can WP access this information from this other server, such as via an API? What authentication, if any, would WP need to access this information? It sounds like you don’t so much need a WP auth cookie as much as some kind of authentication for this other backend.

    In fact, unless it’s blocked by a firewall or something, WP could connect directly to this other DB and make its own queries as needed.

    Thread Starter George Moureau

    (@georgepiccexcellencecom)

    Yeah, see I don’t want all of the WordPress functionality. This site has been around for 20 plus years and I’m converting the look and feel so the marketers can control the copy. I don’t want a WordPress login screen, etc.

    Actually, I’ve found a reasonable work around that solves my problem. Instead of having a login showing on the Navbar, I’m using sign in/my account. The actual login program will check for our login cookie and either jump to the login screen or their account information screen.

    So, problem solved. Thanks everyone for your thought and ideas.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WordPress front end sql backend’ is closed to new replies.