summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2008-10-18 11:05:41 +0000
committerMax Kremmel <xing@synapse.plus.com>2008-10-18 11:05:41 +0000
commit5042c221b273ffd8c47b28fd02e35f7226a040ee (patch)
tree4be855708d5de8980e99647f9c5e8aa7cc9bb68c
parent8b04c1079f78f89108948ef12433790f131ae0ae (diff)
downloadusers-5042c221b273ffd8c47b28fd02e35f7226a040ee.tar.gz
users-5042c221b273ffd8c47b28fd02e35f7226a040ee.tar.bz2
users-5042c221b273ffd8c47b28fd02e35f7226a040ee.zip
don't deprecate setPermission. it might come in handy.
-rw-r--r--BitPermUser.php46
1 files changed, 23 insertions, 23 deletions
diff --git a/BitPermUser.php b/BitPermUser.php
index ec13bfa..b220b5a 100644
--- a/BitPermUser.php
+++ b/BitPermUser.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/BitPermUser.php,v 1.68 2008/10/18 09:48:44 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/BitPermUser.php,v 1.69 2008/10/18 11:05:41 squareing Exp $
*
* Lib for user administration, groups and permissions
* This lib uses pear so the constructor requieres
@@ -11,7 +11,7 @@
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: BitPermUser.php,v 1.68 2008/10/18 09:48:44 squareing Exp $
+ * $Id: BitPermUser.php,v 1.69 2008/10/18 11:05:41 squareing Exp $
* @package users
*/
@@ -24,7 +24,7 @@ require_once( USERS_PKG_PATH.'/BitUser.php' );
* Class that holds all information for a given user
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.68 $
+ * @version $Revision: 1.69 $
* @package users
* @subpackage BitPermUser
*/
@@ -738,6 +738,26 @@ class BitPermUser extends BitUser {
}
/**
+ * setPermission temporarily set the permission for the active user does NOT store the permission
+ *
+ * @param array $pPerm
+ * @param array $pValue
+ * @access public
+ * @return TRUE on success, FALSE on failure - mErrors will contain reason for failure
+ */
+ function setPermission( $pPerm, $pValue = NULL ) {
+ if( $this->isAdmin() ) {
+ $this->mPerms[$pPerm] = TRUE;
+ } elseif( $this->isValid() ) {
+ if( $pValue == 'y' || $pValue == TRUE ) {
+ $this->mPerms[$pPerm] = TRUE;
+ } else {
+ unset( $this->mPerms[$pPerm] );
+ }
+ }
+ }
+
+ /**
* getGroupPermissions
*
* @param array $pGroupId Group id, if unset, all groups are returned
@@ -927,26 +947,6 @@ class BitPermUser extends BitUser {
}
return $sGroupUsers[$pGroupId];
}
- /**
- * setPermission temporarily set the permission for the active user does NOT store the permission
- *
- * @param array $pPerm
- * @param array $pValue
- * @access public
- * @return TRUE on success, FALSE on failure - mErrors will contain reason for failure
- */
- function setPermission( $pPerm, $pValue = NULL ) {
- deprecated( "This method doesn't seem to be used. Please remove this note if it is actually used." );
- if( $this->isAdmin() ) {
- $this->mPerms[$pPerm] = TRUE;
- } elseif( $this->isValid() ) {
- if( $pValue == 'y' || $pValue == TRUE ) {
- $this->mPerms[$pPerm] = TRUE;
- } else {
- unset( $this->mPerms[$pPerm] );
- }
- }
- }
function changePermissionLevel($perm, $pLevel) {
deprecated( "This method doesn't seem to be used. Please remove this note if it is actually used." );
$query = "update `".BIT_DB_PREFIX."users_permissions` set `perm_level` = ?