Seite 1 von 1

auth->generelle frage

Verfasst: 04.11.2006 22:44
von Ambience
Hallo, ich habe eine frage zum auth system...

ich will nur prüfen ob einem user erlaubt wurde bestimmte chat_rooms(nennen wir das mal so) zu sehen.

nun habe ich in meiner chat_rooms tabelle aber nur:

auth_view

ist damit dann trotzdem eine abfrage möglich? und wenn ja, stimmt meine?

Code: Alles auswählen

$is_auth_ary = array();
	$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $chat_data);
und was ist der unterschied zwischen der konstate AUTH_LIST und AUTH_LIST_ALL?

Vielen dank

Verfasst: 05.11.2006 11:30
von Ambience
bump

Verfasst: 05.11.2006 12:13
von Olli Oberhausen

Code: Alles auswählen

  32      * If you set type to AUTH_ALL and specify a forum_id an array of all auth types
  33      will be returned
  34  
  35      * If you provide a forum_id a specific lookup on that forum will be done
  36  
  37      * If you set forum_id to AUTH_LIST_ALL and specify a type an array listing the
  38      results for all forums will be returned
  39  
  40      * If you set forum_id to AUTH_LIST_ALL and type to AUTH_ALL a multidimensional
  41      array containing the auth permissions for all types and all forums for that
  42      user is returned

Verfasst: 05.11.2006 13:22
von Ambience
und jetzt auf deutsch... ich merke, mein englisch (auch wenns ein kleiner rest ist) hat mich gerade verlassen.

Verfasst: 05.11.2006 13:30
von Olli Oberhausen
1. $is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $chat_data);

gibt dir ein array aus in dem alle foren auf auth_view geprüft werden

2. $is_auth = auth(AUTH_VIEW, 5, $userdata, $chat_data);

gibt dir ein array aus in dem nur forum 5 auf auth_view geprüft wird.


1 brauchst du z.b. in einer foren übersicht
2 brauchst du wenn du auf das forum zugreifst.

Olli

Verfasst: 05.11.2006 13:33
von Ambience
dann wäre, das erste für mich geeignet. vielen dank

also, das reicht dann, wenn ich bei meinen chat_rooms einfach eine spalte mit auth_view anlege...