Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
2 + 5 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: How do I stop guests from viewing registered user profiles?
by scrapie on 2004/6/6 3:42:36

This is great thanks! Works like a charm.
Re: How do I stop guests from viewing registered user profiles?
by treefrog on 2004/4/24 21:02:52

I answered my own question. Sorry.

I had forgotten to close the if clause. that's all. Now I can do it any way I please.

That's what happens when you're learning!
Re: How do I stop guests from viewing registered user profiles?
by treefrog on 2004/4/24 20:56:26

I tried both:

$xoopsUser or redirect_header('index.php', 3, _NOPERM);

and the if clause version above. Both only render a completely blank page for me when I test it out as a guest user...

am I missing something?


Is it possible to add a:

<{if $xoops_isuser}>

somewhere in the template instead? If so, where would be the best place?

Could I actually just plug it in the certain boxes in the table for just the info I'd like covered? (i.e., the email address)

I'm sorry to sound like a ditz... I'm still trying to understand PHP...
Re: How do I stop guests from viewing registered user profiles?
by ajaxbr on 2004/3/22 17:25:32

Thanks a lot, Dave... this is much more elegant, so nobody can say it's an ugly hack anymore

I just skimmed over /kernel/user.php and saw a "rank()", a "&getGroups()" and a "isAdmin()" in there... Could anyone who knows his/her PHP give us a hint about how to use this to check whether an user has stalking profile viewing rights? It'd be something like "get curious-user uid, check his rank, allow or deny access".

Perhaps something like
le="color: #000000"><?php $uid = uid(); $xoopsrank = rank(uid) if !($xoopsrank == "Webmaster" || $xoopsrank == "Moderator" || $xoopsrank == "Masterator") { redirect_header('index.php',3,_NOPERM); exit(); }
(sorry, no habla php)
Re: How do I stop guests from viewing registered user profiles?
by Dave_L on 2004/3/22 15:23:24

Here's a more concise way of doing it:

le="color: #000000"><?php $xoopsUser or redirect_header('index.php', 3, _NOPERM);

Who's Online

628 user(s) are online (582 user(s) are browsing Support Forums)


Members: 0


Guests: 628


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits