https://www.icyphoenix.com/viewtopic.php?f=35&t=3194
-----------------------------------
ieio
Sun 02 Dec, 2007 17:22

Restriction In Viewing User Profile
-----------------------------------
hi everyone
is there a way not to let users to view staff profile or let users to view only theirself profiles? I can't figure how to do it and I dind't find anything in acp and in this forum  :oops: 
thank you in advance  :loveit:


-----------------------------------
novice programmer
Sun 02 Dec, 2007 20:40

Re: Restriction In Viewing User Profile
-----------------------------------
In cms>>permissions>>profile>>"what you want in it´s chekbox"


-----------------------------------
ieio
Sun 02 Dec, 2007 21:00

Re: Restriction In Viewing User Profile
-----------------------------------
excuse me [b]novice programmer[/b], maybe I couldn't explain my intent
I want that users can view only their own profile or can view all profiles but the staff ones: if I set the permissions via cms I can't block users viewing staff profiles, or not?  :oops:
if it's impossible, nevermind  :wink:


-----------------------------------
novice programmer
Mon 03 Dec, 2007 20:29

Re: Restriction In Viewing User Profile
-----------------------------------
[quote user="ieio" post="21949"]excuse me [b]novice programmer[/b], maybe I couldn't explain my intent
I want that users can view only their own profile or can view all profiles but the staff ones: if I set the permissions via cms I can't block users viewing staff profiles, or not?  :oops:
if it's impossible, nevermind  :wink:[/quote]

You will have to make sure that:

$user_id=$userdata['user_id']

or

$userdata['auth']="MOD"

i think you´ll need some help from MG.


-----------------------------------
Mighty Gorgon
Sun 16 Dec, 2007 00:43

Re: Restriction In Viewing User Profile
-----------------------------------
[quote user="ieio" post="21949"]excuse me [b]novice programmer[/b], maybe I couldn't explain my intent
I want that users can view only their own profile or can view all profiles but the staff ones: if I set the permissions via cms I can't block users viewing staff profiles, or not?  :oops:
if it's impossible, nevermind  :wink:[/quote]
You can do that only by modifying the profile page...

It is not easy, because you have to add an extra SQL to check if the user is mod or admin and only then you know if profile may be shown or not.

In next version it should be easiest doing that, because I have created some extra functions for doing this.

When next RC will be out, bump this topic and I'll show you how to do that. :wink:


