This topic has 8 replies, 3 voices, and was last updated 9 years by NetConcept.
-
Author
Tagged: BuddyPres, security risk
-
January 17, 2015 at 00:45 #42436konnectworksParticipant
How do I make administrators of my site private so they do not show up as members of the site.
Attachments:
You must be logged in to view attached files.January 20, 2015 at 16:41 #42772RaduModeratorAdd this code to your sweetdate-child theme functions.php
COPY CODE// Remove admin from the member directory function bpdev_exclude_users($qs=false,$object=false){ $excluded_user='1'; // Id's to remove, separated by comma if($object != 'members' && $object != 'friends')// hide admin to members & friends return $qs; $args=wp_parse_args($qs); if(!empty($args['user_id'])) return $qs; if(!empty($args['exclude'])) $args['exclude'] = $args['exclude'].','.$excluded_user; else $args['exclude'] = $excluded_user; $qs = build_query($args); return $qs; } add_action('bp_ajax_querystring','bpdev_exclude_users',20,2); // once admin is removed, we must recount the members ! function bpfr_hide_get_total_filter($count){ return $count-1; } add_filter('bp_get_total_member_count','bpfr_hide_get_total_filter');
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJanuary 20, 2015 at 19:58 #42804konnectworksParticipantI don’t have a child-theme for Sweetdate is what I was told from my web site developer. Do I have to have one?
January 20, 2015 at 21:08 #42809konnectworksParticipantSorry…I was misinformed. I do have a child-theme but my website has been setup and configured using the main theme.
Does this cause an issue?
January 21, 2015 at 12:32 #42845RaduModeratorNo, it can not cause a problem paste code in your child theme functions
Let me know if it works.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 9, 2015 at 21:47 #49413NetConceptParticipantHello Radu,
I used your code to hide the admin, and it works only intermittently. Regardless of clearing browser history or not.I’m very disappointed with BuddyPress not offering this in their core to hide the admin. Why should the site admin be forced to have a profile?
After all, we all go through a lot of trouble not using the WP “admin” for the back end, and change DB prefixes for security reasons to mention a few, yet BuddyPress forces one to reveal the admin username liberally. I tried turning Activity Streams off, but it makes no difference.
Hence, this is not just an inconvenience, but a major security risk! If I can’t find a solution for this I’ll have to disable the BuddyPress plugin, and purchase a script catering specifically to online dating.
As much as I like the WP based idea and the looks of SweetDate, but for tight membership control there are yet major obstacles to overcome, and the SweetDate theme not being compatible with the DS Plugin, does not help either.
March 10, 2015 at 17:22 #49506RaduModeratorHello NetConcept,
Also try this solution https://archived.seventhqueen.com/forums/topic/admin-profile-2
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 11, 2015 at 02:41 #49612NetConceptParticipantThanks Radu… much appreciated!
I hope the second code keeps the admin hidden in all cases.
In the meantime I figured out what caused the admin to show at certain times. I’m using the “BP Registration Options” plugin, and any time someone registered, and the “All Members” count increased by 1, that’s when the admin became visible, but the plugin correctly prevented the new user from showing, until approved.
Disabling the plugin made no difference, only approval or deletion of the new member made the admin invisible again.
Very strange, and never a dull moment, as certainly all images an any test profile no longer enlarge and return the “The content could not be loaded” error. Something to do with the resent RT update perhaps, because everything worked before.
-
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.