Procedural File: auth_functions.php

Source Location: /php/auth/auth_functions.php



Classes:

Page Details:

auth/auth_functions.php

holds all of the functions related to auth within ARK

PHP versions 4 and 5

LICENSE: ARK - The Archaeological Recording Kit. An open-source framework for displaying and working with archaeological data Copyright (C) 2008 L - P : Partnership Ltd. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Tags:





getAuthItems

array getAuthItems( [array $modules = FALSE], [array $filter = FALSE])

[line 167]

creates an array containing the items that the user is able to view. If the item is not in the array then the user will not be able to even view it.

Tags:

  • return - array containing all of the authorised items
  • author - Stuart Eve
  • since - 0.6
  • access - public

Parameters

  • array $modules - OPTIONAL an array containing the modules that the user is allowed to view. If this is not set then the global $loaded_modules array is used
  • array $filter - OPTIONAL a results_array from the result of a filter or filterset this will be cleaned and returned as a properly formed authitems array

[ Top ]

getAuthorisedPages

array getAuthorisedPages( array $sgrp_arr)

[line 92]

retrieves an array of authorised pages (with associated information) for the user, dependent on their security group

Tags:

  • return - contains the results of a fetch array on cor_tbl_wwwpages, containing all of the pages the user has access to
  • author - Stuart Eve
  • since - 0.6
  • access - public

Parameters

  • array $sgrp_arr - contains the security groups the user is a member of

[ Top ]

getPermUserId

integer getPermUserId( integer $user_id, [string $auth_container = 'ARK_USERS'])

[line 52]

retrieves the permUserId from the liveuser tables. Use this function when you need to know what a ARK user id is when mapped to the liveuser tables.

Tags:

  • return - the perm user id or FALSE on failure.
  • author - Stuart Eve
  • since - 0.6
  • access - public

Parameters

  • integer $user_id - the id you are looking for (this is the id of the user id cor_tbl_users)
  • string $auth_container - this is the auth container that the id relates to. The default value is ARK_USERS

[ Top ]

getSfilter

array getSfilter( integer $sfilter_id)

[line 233]

checks if a security filter is set for the user and if so it runs the filter and returns the results array. This can then be sent to the getAuthItems function.

Tags:

  • return - array formulated as a results_array
  • author - Stuart Eve
  • since - 0.6
  • access - public

Parameters

  • integer $sfilter_id - the id of the security filter for that user

[ Top ]


Documentation generated on Thu, 26 Feb 2009 16:48:14 +0000 by phpDocumentor 1.4.1