Wrong controls for logged out users

Own logged in users controls appears to logged out users, like widget right controls and edit / delete in blog posts. Here an example. How can I find out the problem causes/code?. I´ve try to deactivate some plugins but problem persists.

  • Set owner' permissions on the page like:

    //On the page for users' content

    elgg_set_page_owner_guid(elgg_get_logged_in_user_guid());

     

    //On the page for group' content

    $guid = (int) get_input("group_guid");
        
    elgg_set_page_owner_guid($guid);

     

    Also, add this rules (on e.g. sidebar's or module's parts):

    //On the page for users' content

    $user = elgg_get_page_owner_entity();
    if (!$user || !elgg_instanceof($user, 'user')) {
        forward();
    }

    //On the page for group' content (your topic :)

    $group = elgg_get_page_owner_entity();
    if (!$group || !elgg_instanceof($group, 'group')) {
        forward();
    }

  • @RvR I think that I´ve some wrong code in my net, because by default Elgg don't give access to this controls to logged out users, so I suppose I must find out this wrong code (or plugin) and correct or erase it, not to add new code, but I dont know how to find de origin of the problem.

    Anyway, whrere I must put your suggested code?

    Thanks!

  • whrere I must put your suggested code?

    On the group's profile (or similar) page

    By default, all works OK. Just see at

    mod\groups\lib\groups.php
    mod\groups\views\default\groups\profile\module.php