Welcome to Geeklog, Anonymous Thursday, February 06 2025 @ 11:19 am EST
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.
13
16
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?
// 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
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
12
13
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.
Thank you.
9
15
Quote
All times are EST. The time is now 11:19 am.
- 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