Authentication and external redirect for wordpress sites

3

I am creating a simple login system that redirects a client to your area. It will contain links to your projects, that is, by clicking, it will be redirected to your site.

EXAMPLE: I have a folder named sites_clients in this hierarchy:

sites_clientes
       cliente_1
        -worpress1
        -worpress2
        -worpress3

       cliente_2
        -worpress1
        -worpress2

All clients will have access to sites_clientes for authentication .

DOUBT: What file, from the root folder of WORDPRESS , should I use conditions with $_SESSION for authentication?     

asked by anonymous 03.03.2015 / 15:21

1 answer

2

One way to automatically authenticate a user in Wordpress is through the wp_authenticate() API.

When the user logs in to the main site, you need to give include in Wordpress and run the call by passing the user and user password in Wordpress.

Note that you need to have its data on your main system, but how to get it will depend on how the installation is configured.

There are other ways to get the same effect, but this is the least intrusive. Alternatives include using a plugin or overwrite authentication method .

    
04.03.2015 / 15:04