News - Features - Downloads - Forum - Team - Support - Switch View: Screen
Login - Registrierung - Passwort vergessen

Antworten: 4
Seite [1]
Str3ss


Wannabe poster




Beiträge: 20
# Thema - 22.02.2012 um 19:20 Uhr
Hi all,

I'm at this moment totally stumped by a problem. In the shoutbox I want to check if the shoutbox user is an admin (access_clansphere >= 4).
I have this code:
 
1.
1. / 2. / ... 
 $data['if']['admin'] = $account['access_clansphere'] >= 0;


But this checks if the LOGGED IN user has the access level, but not the shoutbox user.
How can this be fixed?

Thanks in advance!


Zuletzt editiert von Str3ss am 22.02.2012 um 19:25 Uhr (1x Editiert)
Inaktiv
hajo ClanSphere Team


VIP - Poster




Herkunft: Barsbüttel
Beiträge: 9411
# Antwort: 1 - 22.02.2012 um 20:17 Uhr
you need to use the $user content instead of $account then. $account is just for the currently logged in user.


------------------
ClanSphere - professional clan care starts here

Inaktiv
|
Str3ss
Thread-Ersteller


Wannabe poster




Beiträge: 20
# Antwort: 2 - 22.02.2012 um 20:20 Uhr
Thanks hajo for your answer but it didn't worked.
I have now this:
 
1.
1. / 2. / ... 
 $data['if']['admin'] = (empty($data['if']['panel']) AND $user['access_clansphere'] >= 4) ? 0;

And the result is nothing, I don't get something. (empty space).


Inaktiv
|
hajo ClanSphere Team


VIP - Poster




Herkunft: Barsbüttel
Beiträge: 9411
# Antwort: 3 - 22.02.2012 um 20:23 Uhr
$user was en example, you have to use the variable that contains the array with user information in the corresponding file. maybe its inside $data or something similar, but never $account ^^


------------------
ClanSphere - professional clan care starts here

Zuletzt editiert von hajo ClanSphere Team am 22.02.2012 um 20:23 Uhr (1x Editiert)
Inaktiv
|
Str3ss
Thread-Ersteller


Wannabe poster




Beiträge: 20
# Antwort: 4 - 22.02.2012 um 20:33 Uhr
Hmm.. Weird, what I already tried and doesn't work (it always shows the text for USERS not ADMINS):
 
1.
2.
1. / 2. / ... 
 $data['if']['admin'] = (empty($data['if']['panel']) AND $data['access_clansphere'] >= 4) ? 0;
  
$data['if']['user'] = (empty($data['if']['panel']) AND $data['access_clansphere'] <= 3) ? 0;


 
1.
2.
1. / 2. / ... 
   $data['if']['admin'] = (empty($data['if']['panel']) AND $data['shoutbox'][$i]['shoutbox_name']['access_clansphere'] >= 4) ? 0;
  
$data['if']['user'] = (empty($data['if']['panel']) AND $$data['shoutbox'][$i]['shoutbox_name']['access_clansphere'] <= 3) ? 0;


 
1.
2.
1. / 2. / ... 
   $data['if']['admin'] = (empty($data['if']['panel']) AND $user['access_clansphere'] >= 4) ? 0;
  
$data['if']['user'] = (empty($data['if']['panel']) AND $user['access_clansphere'] <= 3) ? 0;


 
1.
2.
1. / 2. / ... 
   $data['if']['admin'] = (empty($data['if']['panel']) AND $data['shoutbox']['access_clansphere'] >= 4) ? 0;
  
$data['if']['user'] = (empty($data['if']['panel']) AND $data['shoutbox']['access_clansphere'] <= 3) ? 0;


Any further ideas?


Inaktiv
|
Antworten: 4
Seite [1]


Sie müssen sich registrieren, um zu antworten.


ClanSphere Project - Mailus - Imprint - Disclaimer - Scriptinfo