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

Class: ipbwi_permissions

Source Location: /ipbwi/lib/permissions.inc.php

Class Overview

ipbwi
   |
   --ipbwi_permissions



Author(s):

  • Matthias Reuter ($LastChangedBy: matthias $)

Version:

  • $LastChangedDate: 2008-10-31 15:33:34 +0000 (Fr, 31 Okt 2008) $

Copyright:

  • 2007-2010 IPBWI development team

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: 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::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::sysInfo()
informations about the current IPBWI and PHP installation
ipbwi::__destruct()

Class Details

[line 11]


Tags:

author:  Matthias Reuter ($LastChangedBy: matthias $)
version:  $LastChangedDate: 2008-10-31 15:33:34 +0000 (Fr, 31 Okt 2008) $
copyright:  2007-2010 IPBWI development team
link:  http://ipbwi.com
since:  2.0
license:  GNU General Public License


[ Top ]


Class Methods


method best [line 95]

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

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



Tags:

return:  best permissions
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->permissions->best(array('g_max_messages');
access:  public


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

[ Top ]

method has [line 35]

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

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



Tags:

return:  true if user has perm, otherwise false
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->permissions->has('g_access_cp',55);
access:  public


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.

[ Top ]

method sort [line 73]

array sort( string $permArray)

Attempts to sort out the weird permissions array.



Tags:

return:  sorted permissions
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->permissions->sort(array('show' => '*','read' => '*','start' => '*','reply' => '*','upload' => '*','download' => '*'));
access:  public


Parameters:

string   $permArray   the permission array to be sorted

[ Top ]


Documentation generated on Sat, 23 Oct 2010 23:36:00 +0200 by phpDocumentor 1.4.3