phpDocumentor permissions
[ class tree: permissions ] [ index: permissions ] [ all elements ]

Class: permissions

Source Location: /lib/permissions.inc.php

Class permissions

Class Overview

Located in /lib/permissions.inc.php [line 11]

ipbwi
   |
   --permissions
Author(s):
  • Matthias Reuter ($LastChangedBy: matthias $)
Information Tags:
Version:  $LastChangedDate: 2008-10-31 15:33:34 +0000 (Fr, 31 Okt 2008) $
Copyright:  2007-2008 IPBWI development team
Link:  http://ipbwi.com
Since:  2.0
License:  GNU General Public License

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From ipbwi

ipbwi::$DB
ipbwi::$ips

Inherited From ipbwi

ipbwi::addSystemMessage()
adds a system message
ipbwi::date()
Returns textual/timestamp offsetted date by board and by member offset and DST setting.
ipbwi::getBoardVar()
gets the requested board-var
ipbwi::getLibLang()
gets the language-var from actual requested native language-bit
ipbwi::info()
informations about the current IPBWI and PHP installation
ipbwi::makeSafe()
filtering html-strings, e.g. for db-queries
ipbwi::printSystemMessages()
prints system messages
ipbwi::properXHTML()
filtering HTML strings
ipbwi::setLang()
Set's current SDK language
ipbwi::updateSession()
Update Member Session Informations

Inherited From ipbwi

ipbwi::DEV_TEAM
ipbwi::PROJECT_LEADER
ipbwi::TITLE
ipbwi::VERSION
ipbwi::WEBSITE

[ Top ]
Method Summary
array   best()   Returns the best perms a user has for something...
bool   has()   Finds out if a user has permission to do something...
array   sort()   Attempts to sort out the weird permissions array.

[ Top ]
Methods
best  [line 99]

  array best( string $perm, [int $user = false], [bool $zero = true]  )

Returns the best perms a user has for something...

Parameters:
string   $perm:  the permission to be worked out
int   $user:  the user to have permissions checked. if left blank, currently logged in user used.
bool   $zero:  if true, zero is best

API Tags:
Return:  best permissions
Access:  public

Information Tags:
Author:  Pita <peter@randomnity.com>
Author:  Matthias Reuter
Author:  Grinler
Since:  2.0
Sample:  
  1.  $ipbwi->permissions->best(array('g_max_messages');

[ Top ]
has  [line 36]

  bool has( string $perm, [int $user = false]  )

Finds out if a user has permission to do something...

Parameters:
string   $perm:  the permission to be worked out
int   $user:  the user to have permissions checked. If left blank, currently logged in user used.

API Tags:
Return:  true if user has perm, otherwise false
Access:  public

Information Tags:
Author:  Pita <peter@randomnity.com>
Author:  Matthias Reuter
Since:  2.0
Sample:  
  1.  $ipbwi->permissions->has('g_access_cp',55);

[ Top ]
sort  [line 75]

  array sort( string $permArray  )

Attempts to sort out the weird permissions array.

Parameters:
string   $permArray:  the permission array to be sorted

API Tags:
Return:  sorted permissions
Access:  public

Information Tags:
Author:  Pita <peter@randomnity.com>
Author:  Matthias Reuter
Since:  2.0
Sample:  
  1.  $ipbwi->permissions->sort(array('show' => '*','read' => '*','start' => '*','reply' => '*','upload' => '*','download' => '*'));

[ Top ]

Documentation generated on Mon, 02 Mar 2009 23:50:55 +0100 by phpDocumentor 1.4.0