Welcome to Geeklog, Anonymous Friday, May 17 2024 @ 02:01 pm EDT

Geeklog Forums

Security issue on links


Atlantean

Anonymous
I used the custom links option and added my own url's in the top of my main page, but I'm unable to hide these. I have my site setup with a login for registered users and have hid everything (unless logged in) but these custom links are not hidden and unregistered users can access these pages. Is there a function that can hide these unless logged in? Thanks to all in advance for your responses.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Wouldn't this piece of sample code from the included lib-custom.php solve your problem?

Text Formatted Code
    // Sample link #2: Link to the Personal Calendar - only visible for
    // logged-in users
    if (!empty ($_USER['uid']) && ($_USER['uid'] > 1)) {
        $myentries[] = array ('url'   => $_CONF['site_url']
                                         . '/calendar/index.php?mode=personal',
                              'label' => 'My Calendar');
    }

bye, Dirk
 Quote

Atlantean

Anonymous
I still don't know how you are able to support the many people that you do and provide answers (99.9% correct and if you were wrong, it was the user didn't provide you the correct statement) all these years...in other words, you help is greatly appreciated. I know you must get frustrated at times with the obvious (probably like this one) but the best part of it is I just learned a new function…I’ll also search a little deeper next time

Thank you.
 Quote

All times are EDT. The time is now 02:01 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content