Skip to:
Content
Pages
Categories
Search
Top
Bottom
  • AF posted a new activity comment 14 years, 5 months ago

    oh, there is one – ` – in first row, u have to delet this. You can modify the “/profile/” in preg_match to any string u want. Have fun!

  • AF posted a new activity comment 14 years, 5 months ago

    `function restrict_access(){
    global $bp, $bp_unfiltered_uri;

    $url=(!empty($_SERVER[‘HTTPS’])) ? “https://”.$_SERVER[‘SERVER_NAME’].$_SERVER[‘REQUEST_URI’] : “http://”.$_SERVER[‘SERVER_NAME’].$_SERVER[‘REQUEST_URI’];

    if(!preg_match(“/profile/”,$url)) {

    if (!is_user_logged_in() &&
    ( BP_GROUPS_SLUG == $bp->current_component ||
    BP_BLOGS_SLUG ==…[Read more]

    • oh, there is one – ` – in first row, u have to delet this. You can modify the “/profile/” in preg_match to any string u want. Have fun!

  • AF posted an update 14 years, 5 months ago

    @mercime Have a nice solution for
    https://buddypress.org/community/groups/creating-extending/forum/topic/securing-components-from-non-logged-in-users/?topic_page=4&num=15

    dont know if its still relevant… here is my code:

    current_component ||
    BP_BLOGS_SLUG == $bp->current_component ||
    BP_MEMBERS_SLUG ==…[Read more]

    • `function restrict_access(){
      global $bp, $bp_unfiltered_uri;

      $url=(!empty($_SERVER[‘HTTPS’])) ? “https://”.$_SERVER[‘SERVER_NAME’].$_SERVER[‘REQUEST_URI’] : “http://”.$_SERVER[‘SERVER_NAME’].$_SERVER[‘REQUEST_URI’];

      if(!preg_match(“/profile/”,$url)) {

      if (!is_user_logged_in() &&
      ( BP_GROUPS_SLUG == $bp->current_component ||
      BP_BLOGS_SLUG ==…[Read more]

      • oh, there is one – ` – in first row, u have to delet this. You can modify the “/profile/” in preg_match to any string u want. Have fun!

Skip to toolbar