Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › How to prevent login to dashbord to users from another subsite in WP multisite?
- This topic has 29 replies, 4 voices, and was last updated 2 years, 8 months ago by Usapuka.
-
AuthorPosts
-
May 18, 2021 at 11:25 am #357907VeronicaModeratorplease confirm if the issue is solvedMay 18, 2021 at 12:26 pm #357921UsapukaSpectatorHi 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,May 19, 2021 at 2:07 pm #358150Anshuman SahuKeymasterPlease 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; }
May 19, 2021 at 3:26 pm #358164UsapukaSpectatorHi 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,May 20, 2021 at 2:59 pm #358325Anshuman SahuKeymasterIssue solved here : https://wplms.io/support/forums/topic/error-404-when-same-pages-are-selected-in-buddypress/May 20, 2021 at 5:19 pm #358349UsapukaSpectatorHi 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,May 24, 2021 at 11:47 am #358811UsapukaSpectatorHi 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,June 2, 2021 at 12:42 am #359924MrVibeKeymasterThank 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.June 2, 2021 at 12:06 pm #359993UsapukaSpectatorHi Mr.Vibe, Thanks for your reply, I look forward to the plugin update.June 23, 2021 at 4:39 pm #362561UsapukaSpectatorHi, 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, regardsJune 24, 2021 at 1:37 pm #362690Anshuman SahuKeymasteryes 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.August 10, 2021 at 11:35 am #367647MrVibeKeymasterThis should be resolved with 1.6 update : https://www.youtube.com/watch?v=pIIAzBBLqHUAugust 10, 2021 at 6:26 pm #367696UsapukaSpectatorHello 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,August 12, 2021 at 1:01 pm #367915Anshuman SahuKeymasterYEs 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 .August 16, 2021 at 12:46 pm #368257UsapukaSpectatorThanks for the info Alex, glad to hear you are working on the problem. I hope a solution is founded soon. -
AuthorPosts
- You must be logged in to reply to this topic.