How to prevent login to dashbord to users from another subsite in WP multisite?

Home Forums Legacy Support Support queries How-to & Troubleshooting How to prevent login to dashbord to users from another subsite in WP multisite?

Viewing 15 posts - 16 through 30 (of 30 total)
  • Author
    Posts
  • #357907
    Veronica
    Moderator
    please confirm if the issue is solved
    #357921
    Usapuka
    Spectator
    Hi Veronica, No, the problem is not solved, Alex is working on it: he implemented a fix that didn't work and is now working on why. At the moment I'm waiting for the final solution, please don't close this issue. Regards,
    #358150
    Anshuman Sahu
    Keymaster
    Please try this code :
    
    add_filter( 'authenticate', 'myplugin_auth_signon', 100, 3 );
    function myplugin_auth_signon( $user, $username, $password ) {
    
    	  //allow only login if user is member of this blog
    
    	  if (!is_user_member_of_blog( $user->ID, get_current_blog_id() ) && !is_super_admin( $user->ID )) {
    	    wp_logout();
    	    wp_redirect(network_site_url());exit();
    	  }
    	
         return $user;
    }
    
    #358164
    Usapuka
    Spectator
    Hi Alex, At the moment I can't try your script because I'm having another problem logging for into WP, I'm getting a Error 404 error I guess it's with what I've reported here and haven't solved yet: https://wplms.io/support/forums/topic/error-404-when-same-pages-are-selected-in-buddypress/. I can only login through VibePB and then login to WP: https://screencast-o-matic.com/watch/crhqoDVfmhf Any suggestions? After I solve the login problem I will be able to test the script properly. Thanks, regards,
    #358325
    Anshuman Sahu
    Keymaster
    Issue solved here : https://wplms.io/support/forums/topic/error-404-when-same-pages-are-selected-in-buddypress/
    #358349
    Usapuka
    Spectator
    Hi Alex, With the script I can't login to the WP of the main site nor to the subsite. I can only login to VibeBP from both sites: https://screencast-o-matic.com/watch/crhYbnVfKGC. Regards,
    #358811
    Usapuka
    Spectator
    Hi Alex, Any news? I have made new tests of the script: I could check that when a student or instructor wants to login to VibeBP he cannot do it, but she can login when he wants to enter the site where he is registered. The problems I see are that when the login button is hovered over or clicked, the button does not change its state (it does nothing). Another problem is when login the person is taken back to the home page instead of going directly to the dashboard: https://screencast-o-matic.com/watch/crhZXtVfWrR The big problem is that you can't log in to WordPress. Regards,
    #359924
    MrVibe
    Keymaster
    Thank you for the video and description on themeforest comments. we understand the issue. Fix has been added in vibebp plugin and we're currently testing this.
    #359993
    Usapuka
    Spectator
    Hi Mr.Vibe, Thanks for your reply, I look forward to the plugin update.
    #362561
    Usapuka
    Spectator
    Hi, I have updated the plugins: WPLMS to Version 1.5.8 and VibeBP to Version 1.5.8.1, I see that when I want to add a student to a subsite I still see students from another subsite. https://prnt.sc/16gprbt https://prnt.sc/16gu1hr When will this issue be solved? Thanks, regards
    #362690
    Anshuman Sahu
    Keymaster
    yes this is still pending , we tried to fix it but it failed on your site actually users table is common in multisite setup . We are checking what we can do.
    #367647
    MrVibe
    Keymaster
    This should be resolved with 1.6 update : https://www.youtube.com/watch?v=pIIAzBBLqHU
    #367696
    Usapuka
    Spectator
    Hello Mr. Vibe, The problem that continues and has not been solved with version 1.6 is that when I want to add a student to a course from one site, users from another site appear. In the following video you can see that in the site tecnobiz.com.ar is the student "estudiante" (Estudiante TBz), while in campus.tecnobiz.com.ar is "estudcampus" (Estudiante Campus). When I want to add a student in tecnobiz.com.ar, the two "estu..." appear: https://screencast-o-matic.com/watch/crj6FjVjYnn Regards,
    #367915
    Anshuman Sahu
    Keymaster
    YEs this is no solved yet , we have added a fix for this in past updates but in your site it was not working .The issue is that we check for capabilities for particular site and it was not working .
    #368257
    Usapuka
    Spectator
    Thanks for the info Alex, glad to hear you are working on the problem. I hope a solution is founded soon.
Viewing 15 posts - 16 through 30 (of 30 total)
  • You must be logged in to reply to this topic.