Use wordpress login on another site

0

Today I have a site made in Joomla, where the user logs in, and if he is in a certain group, he can access a restricted area, an internally developed php site. This site is in a directory on the same joomla server.

I want to migrate to Wordpress, and I'm looking for a plugin, or another way to keep this permission mechanism to the site developed by the company, using the access control of the wordpress itself.

  • Only logged in users can access the restricted area;
  • The appearance of the restricted area does not have to be the same as the wordpress site;
asked by anonymous 19.08.2016 / 21:24

1 answer

0

A login_redirect filter is used to change the redirected location after logging in. This could be the location defined by the "redirect_to" parameter sent to the login page. There in your pages you could use a function to redirect if you are not logged in. This example redirects administrators to the dashboard and other users to the home page.

<?php auth_redirect(); ?>

Example

Require a user to login to view a restricted page is_user_logged_in :

if ( !is_user_logged_in() ) {
   auth_redirect();
}

Read here at Function Reference / auth redirect .

    
22.08.2016 / 15:24