diff options
30 files changed, 593 insertions, 135 deletions
diff --git a/BaseAuth.php b/BaseAuth.php index c5b2f88..0a8245a 100644 --- a/BaseAuth.php +++ b/BaseAuth.php @@ -47,18 +47,18 @@ class BaseAuth { return $authMethod; } - function getAuthMethod( $pAuthId ) { + public static function getAuthMethod( $pAuthId ) { $authMethod =& BaseAuth::getAuthMethods(); if (empty($authMethod[$pAuthId])) return null; return $authMethod[$pAuthId]; } - function setAuthMethod($pAuthId,&$method) { + public static function setAuthMethod($pAuthId,&$method) { $authMethod =& BaseAuth::getAuthMethods(); $authMethod[$pAuthId]=$method; } - function scanAuthPlugins() { + public static function scanAuthPlugins() { global $gBitSystem; $authDir = $gBitSystem->getConfig( 'users_auth_plugins_dir', USERS_PKG_PATH.'auth/' ); @@ -75,7 +75,7 @@ class BaseAuth { } } - function register($id,$hash) { + public static function register($id,$hash) { global $gBitSystem; $err = false; $method = BaseAuth::getAuthMethod($id); @@ -104,7 +104,7 @@ class BaseAuth { } } - function authError($str) { + public static function authError($str) { $warning = '<div class="error">'.$str.'</div>'; print( $warning ); } @@ -149,10 +149,10 @@ class BaseAuth { return array(); } - function isActive($package = '') { + public static function isActive($package) { global $gBitSystem; - if (empty($package) && !empty($this->mCfg['auth_id'])) { - $package = $this->mCfg['auth_id']; + if (empty($package) ) { + return false; } for ($i=0;$i<BaseAuth::getAuthMethodCount();$i++) { $default=""; @@ -166,7 +166,7 @@ class BaseAuth { return false; } - function init( $pAuthMixed ) { + public static function init( $pAuthMixed ) { global $gBitSystem; if( is_numeric( $pAuthMixed ) ) { $default=""; @@ -191,7 +191,7 @@ class BaseAuth { return false; } - function getConfig() { + public static function getConfig() { global $gBitSystem; $authSettings = array(); foreach( BaseAuth::getAuthMethods() as $meth_name => $method ) { diff --git a/BitPermUser.php b/BitPermUser.php index 6802fa1..b2dc2a3 100644 --- a/BitPermUser.php +++ b/BitPermUser.php @@ -357,7 +357,7 @@ class BitPermUser extends BitUser { */ function expungeGroup( $pGroupId ) { // we cannot remove the anonymous group - if( $pGroupId != ANONYMOUS_GROUP_ID ) { + if( $pGroupId != ANONYMOUS_TEAM_ID ) { $query = "DELETE FROM `".BIT_DB_PREFIX."users_groups_map` WHERE `group_id` = ?"; $result = $this->mDb->query( $query, array( $pGroupId )); $query = "DELETE FROM `".BIT_DB_PREFIX."users_group_permissions` WHERE `group_id` = ?"; @@ -661,7 +661,7 @@ class BitPermUser extends BitUser { INNER JOIN `".BIT_DB_PREFIX."users_group_permissions` ugp ON ( ugp.`perm_name`=up.`perm_name` ) INNER JOIN `".BIT_DB_PREFIX."users_groups` ug ON ( ug.`group_id`=ugp.`group_id` ) LEFT OUTER JOIN `".BIT_DB_PREFIX."users_groups_map` ugm ON ( ugm.`group_id`=ugp.`group_id` AND ugm.`user_id` = ? ) - WHERE ug.`group_id`= ".ANONYMOUS_GROUP_ID." OR ugm.`group_id`=ug.`group_id`"; + WHERE ug.`group_id`= ".ANONYMOUS_TEAM_ID." OR ugm.`group_id`=ug.`group_id`"; $this->mPerms = $this->mDb->getAssoc( $query, array( $this->mUserId )); // Add in override permissions if( !empty( $this->mPermsOverride ) ) { diff --git a/BitUser.php b/BitUser.php index 29823a2..a5d13cf 100644 --- a/BitUser.php +++ b/BitUser.php @@ -244,7 +244,7 @@ class BitUser extends LibertyMime { $this->mErrors['login'] = tra( "Your username can only contain numbers, characters, underscores and hyphens." ); } else { // LOWER CASE all logins - $pParamHash['login'] = strtolower( $pParamHash['login'] ); + $pParamHash['login'] = strtolower( strip_tags($pParamHash['login']) ); $pParamHash['user_store']['login'] = $pParamHash['login']; } } @@ -424,10 +424,9 @@ class BitUser extends LibertyMime { * verifyEmail * * @param array $pEmail - * @access public * @return TRUE on success, FALSE on failure, or -1 if verifyMX had a connection failure - mErrors will contain reason for failure */ - function verifyEmail( $pEmail , &$pErrors ) { + public function verifyEmail( $pEmail , &$pErrors ) { global $gBitSystem; // check for existing user first, so root@localhost doesn't get attempted to re-register @@ -455,6 +454,29 @@ class BitUser extends LibertyMime { } /** + * verifyAnonEmail + * + * @param array $pEmail + * @return TRUE on success, FALSE on failure, or -1 if verifyMX had a connection failure - mErrors will contain reason for failure + */ + public static function verifyAnonEmail( $pEmail , &$pErrors ) { + global $gBitSystem; + + // check for existing user first, so root@localhost doesn't get attempted to re-register + if( $pEmail == 'root@localhost' || $pEmail == 'guest@localhost' ) { + // nothing to do + } elseif( !validate_email_syntax( $pEmail ) ) { + $pErrors['email'] = 'The email address "'.$pEmail.'" is invalid.'; + } + + if( !isset( $ret ) ) { + $ret = ( count( $pErrors ) == 0 ) ; + } + + return $ret; + } + + /** * verifyMX * * @param array $pEmail @@ -2224,10 +2246,10 @@ class BitUser extends LibertyMime { if ($gBitSystem->isFeatureActive( 'pretty_urls' ) || $gBitSystem->isFeatureActive( 'pretty_urls_extended' ) ) { $ret = USERS_PKG_URL . $rewrite_tag; - $ret .= urlencode( $pParamHash['title'] ); + $ret .= urlencode( $pParamHash['login'] ); } else { $ret = USERS_PKG_URL . 'index.php?home='; - $ret .= urlencode( $pParamHash['title'] ); + $ret .= urlencode( $pParamHash['login'] ); } } return $ret; @@ -2241,7 +2263,7 @@ class BitUser extends LibertyMime { * @access public * @return get a link to the the users homepage */ - function getDisplayLink( $pLinkText=NULL, $pMixed=NULL, $pAnchor=NULL ) { + public function getDisplayLink( $pLinkText=NULL, $pMixed=NULL, $pAnchor=NULL ) { return BitUser::getDisplayNameFromHash( TRUE, $pMixed ); } @@ -2252,7 +2274,7 @@ class BitUser extends LibertyMime { * @access public * @return get the users display name */ - function getTitle( $pHash = NULL, $pDefault=TRUE ) { + public function getTitle( $pHash = NULL, $pDefault=TRUE ) { return BitUser::getDisplayNameFromHash( FALSE, $pHash ); } @@ -2489,7 +2511,7 @@ class BitUser extends LibertyMime { $query = " SELECT ug.`group_id`, ug.`group_name`, ug.`user_id` as group_owner_user_id FROM `".BIT_DB_PREFIX."users_groups_map` ugm INNER JOIN `".BIT_DB_PREFIX."users_groups` ug ON (ug.`group_id`=ugm.`group_id`) - WHERE ugm.`user_id`=? OR ugm.`group_id`=".ANONYMOUS_GROUP_ID; + WHERE ugm.`user_id`=? OR ugm.`group_id`=".ANONYMOUS_TEAM_ID; $ret = $this->mDb->getAssoc( $query, array(( int )$pUserId )); if( $ret ) { foreach( array_keys( $ret ) as $groupId ) { diff --git a/RolePermUser.php b/RolePermUser.php index ca43144..b39b586 100644 --- a/RolePermUser.php +++ b/RolePermUser.php @@ -357,7 +357,7 @@ class RolePermUser extends BitUser { */ function expungeRole( $pRoleId ) { // we cannot remove the anonymous role - if( $pRoleId != ANONYMOUS_ROLE_ID ) { + if( $pRoleId != ANONYMOUS_TEAM_ID ) { $query = "DELETE FROM `".BIT_DB_PREFIX."users_roles_map` WHERE `role_id` = ?"; $result = $this->mDb->query( $query, array( $pRoleId )); $query = "DELETE FROM `".BIT_DB_PREFIX."users_role_permissions` WHERE `role_id` = ?"; @@ -661,7 +661,7 @@ class RolePermUser extends BitUser { INNER JOIN `".BIT_DB_PREFIX."users_role_permissions` urp ON ( urp.`perm_name`=up.`perm_name` ) INNER JOIN `".BIT_DB_PREFIX."users_roles` ur ON ( ur.`role_id`=urp.`role_id` ) LEFT OUTER JOIN `".BIT_DB_PREFIX."users_roles_map` urm ON ( urm.`role_id`=urp.`role_id` AND urm.`user_id` = ? ) - WHERE ur.`role_id`= ".ANONYMOUS_ROLE_ID." OR urm.`role_id`=ur.`role_id`"; + WHERE ur.`role_id`= ".ANONYMOUS_TEAM_ID." OR urm.`role_id`=ur.`role_id`"; $this->mPerms = $this->mDb->getAssoc( $query, array( $this->mUserId )); // Add in override permissions if( !empty( $this->mPermsOverride ) ) { diff --git a/RoleUser.php b/RoleUser.php index 758490f..9877d2b 100644 --- a/RoleUser.php +++ b/RoleUser.php @@ -128,7 +128,7 @@ class BitUser extends LibertyMime { $this->mInfo['user_id'] = $this->mInfo['uu_user_id']; $this->mInfo['is_registered'] = $this->isRegistered(); foreach( array( 'portrait', 'avatar', 'logo' ) as $img ) { - $this->mInfo[$img.'_path'] = $this->getSourceFile( array( 'user_id'=>$this->getField( 'user_id' ), 'package'=>liberty_mime_get_storage_sub_dir_name( array( 'type' => $this->getField( $img.'_mime_type' ), 'name' => $this->getField( $img.'_file_name' ) ) ), 'file_name' => basename( $this->mInfo[$img.'_file_name'] ), 'sub_dir' => $this->getField( $img.'_attachment_id' ) ) ); + $this->mInfo[$img.'_path'] = $this->getSourceFile( array( 'user_id'=>$this->getField( 'user_id' ), 'package'=>liberty_mime_get_storage_sub_dir_name( array( 'mime_type' => $this->getField( $img.'_mime_type' ), 'name' => $this->getField( $img.'_file_name' ) ) ), 'file_name' => basename( $this->mInfo[$img.'_file_name'] ), 'sub_dir' => $this->getField( $img.'_attachment_id' ), 'mime_type' => $this->getField( $img.'_mime_type' ) ) ); $this->mInfo[$img.'_url'] = liberty_fetch_thumbnail_url( array( 'source_file'=>$this->mInfo[$img.'_path'], 'size' => 'small', 'mime_image' => FALSE )); } @@ -424,10 +424,9 @@ class BitUser extends LibertyMime { * verifyEmail * * @param array $pEmail - * @access public * @return TRUE on success, FALSE on failure, or -1 if verifyMX had a connection failure - mErrors will contain reason for failure */ - function verifyEmail( $pEmail , &$pErrors ) { + public function verifyEmail( $pEmail , &$pErrors ) { global $gBitSystem; // check for existing user first, so root@localhost doesn't get attempted to re-register @@ -455,6 +454,29 @@ class BitUser extends LibertyMime { } /** + * verifyAnonEmail + * + * @param array $pEmail + * @return TRUE on success, FALSE on failure, or -1 if verifyMX had a connection failure - mErrors will contain reason for failure + */ + public static function verifyAnonEmail( $pEmail , &$pErrors ) { + global $gBitSystem; + + // check for existing user first, so root@localhost doesn't get attempted to re-register + if( $pEmail == 'root@localhost' || $pEmail == 'guest@localhost' ) { + // nothing to do + } elseif( !validate_email_syntax( $pEmail ) ) { + $pErrors['email'] = 'The email address "'.$pEmail.'" is invalid.'; + } + + if( !isset( $ret ) ) { + $ret = ( count( $pErrors ) == 0 ) ; + } + + return $ret; + } + + /** * verifyMX * * @param array $pEmail @@ -2224,10 +2246,10 @@ class BitUser extends LibertyMime { if ($gBitSystem->isFeatureActive( 'pretty_urls' ) || $gBitSystem->isFeatureActive( 'pretty_urls_extended' ) ) { $ret = USERS_PKG_URL . $rewrite_tag; - $ret .= urlencode( $pParamHash['title'] ); + $ret .= urlencode( $pParamHash['login'] ); } else { $ret = USERS_PKG_URL . 'index.php?home='; - $ret .= urlencode( $pParamHash['title'] ); + $ret .= urlencode( $pParamHash['login'] ); } } return $ret; @@ -2241,7 +2263,7 @@ class BitUser extends LibertyMime { * @access public * @return get a link to the the users homepage */ - function getDisplayLink( $pLinkText=NULL, $pMixed=NULL, $pAnchor=NULL ) { + public function getDisplayLink( $pLinkText=NULL, $pMixed=NULL, $pAnchor=NULL ) { return BitUser::getDisplayNameFromHash( TRUE, $pMixed ); } @@ -2252,7 +2274,7 @@ class BitUser extends LibertyMime { * @access public * @return get the users display name */ - function getTitle( $pHash = NULL, $pDefault=TRUE ) { + public function getTitle( $pHash = NULL, $pDefault=TRUE ) { return BitUser::getDisplayNameFromHash( FALSE, $pHash ); } @@ -2449,9 +2471,9 @@ class BitUser extends LibertyMime { } if( !empty( $res['avatar_file_name'] )) { - $res['avatar_url'] = $this->getSourceUrl( array( 'attachment_id'=>$res['avatar_attachment_id'], 'file_name'=>$res['avatar_file_name'] ) ); + $res['avatar_url'] = $this->getSourceUrl( array( 'attachment_id'=>$res['avatar_attachment_id'], 'mime_type'=>$res['avatar_mime_type'], 'file_name'=>$res['avatar_file_name'] ) ); $res['thumbnail_url'] = liberty_fetch_thumbnail_url( array( - 'source_file' => $this->getSourceFile( array( 'sub_dir'=>$res['avatar_attachment_id'], 'user_id' => $res['user_id'], 'file_name'=>$res['avatar_file_name'], 'package'=>liberty_mime_get_storage_sub_dir_name( array( 'type'=>$res['avatar_mime_type'], 'name'=>$res['avatar_file_name'] ) ) ) ), + 'source_file' => $this->getSourceFile( array( 'sub_dir'=>$res['avatar_attachment_id'], 'user_id' => $res['user_id'], 'file_name'=>$res['avatar_file_name'], 'mime_type'=>$res['avatar_mime_type'], 'package'=>liberty_mime_get_storage_sub_dir_name( array( 'mime_type'=>$res['avatar_mime_type'], 'name'=>$res['avatar_file_name'] ) ) ) ), 'file_name' => $res['avatar_url'], // TODO: Make this a preference 'size' => 'avatar' @@ -2489,7 +2511,7 @@ class BitUser extends LibertyMime { $query = " SELECT ur.`role_id`, ur.`role_name`, ur.`user_id` as role_owner_user_id FROM `".BIT_DB_PREFIX."users_roles_map` urm INNER JOIN `".BIT_DB_PREFIX."users_roles` ur ON (ur.`role_id`=urm.`role_id`) - WHERE urm.`user_id`=? OR urm.`role_id`=".ANONYMOUS_ROLE_ID; + WHERE urm.`user_id`=? OR urm.`role_id`=".ANONYMOUS_TEAM_ID; $ret = $this->mDb->getAssoc( $query, array(( int )$pUserId )); if( $ret ) { foreach( array_keys( $ret ) as $roleId ) { diff --git a/admin/admin_login_inc.php b/admin/admin_login_inc.php index 2eb83a3..a959c5e 100644 --- a/admin/admin_login_inc.php +++ b/admin/admin_login_inc.php @@ -116,9 +116,14 @@ $loginSettings = array( ); $gBitSmarty->assign( 'loginSettings', $loginSettings ); -$listHash = array( 'sort_mode' => 'group_name_asc' ); -$gBitSmarty->assign('groups', $gBitUser->getAllGroups( $listHash )); +if (defined ('ROLE_MODEL') ) { + $listHash = array( 'sort_mode' => 'role_name_asc' ); + $gBitSmarty->assign( 'roleList', $gBitUser->getAllRoles( $listHash )); +} else { + $listHash = array( 'sort_mode' => 'group_name_asc' ); + $gBitSmarty->assign('groups', $gBitUser->getAllGroups( $listHash )); +} if( !function_exists("gd_info" ) ) { $gBitSmarty->assign( 'warning', 'PHP GD library is required for this feature (not found on your system)' ); @@ -152,7 +157,7 @@ if( !empty( $_REQUEST["loginprefs"] ) ) { $in = array(); $out = array(); foreach( $groupList as $gr ) { - if( $gr['group_id'] == ANONYMOUS_GROUP_ID ) { + if( $gr['group_id'] == ANONYMOUS_TEAM_ID ) { continue; } @@ -266,7 +271,6 @@ if( !empty( $_REQUEST["httpprefs"] ) ) { } $listHash = array(); -$gBitSmarty->assign_by_ref( 'groupList', $gBitUser->getAllGroups( $listHash )); // This needs to be made more generic so that it picks up all plugins // Could not see where the 'auth_ldap' was defined in the $options['avail'] array @@ -282,5 +286,5 @@ if( !empty( $_REQUEST["auth_ldap"] ) ) { } } -$gBitSmarty->assign_by_ref( 'authSettings', BaseAuth::getConfig() ); +$gBitSmarty->assign( 'authSettings', BaseAuth::getConfig() ); ?> diff --git a/admin/api_help_inc.php b/admin/api_help_inc.php index 504694b..f338ad9 100644 --- a/admin/api_help_inc.php +++ b/admin/api_help_inc.php @@ -32,7 +32,7 @@ Connection: close Date: Fri, 20 Jul 2012 01:36:13 GMT Pragma: no-cache Server: Apache/2.2.3 (CentOS) -Set-Cookie: BWSESSION=2ishv84g637mrp7o07hd8829f6; path='.$gBitSystem->getConfig( 'cookie_path', '/' ).'; domain='.$gBitSystem->getConfig( 'cookie_domain', $cookieDomain ).' +Set-Cookie: BWSESSION=2ishv84g637mrp7o07hd8829f6; path='.$gBitSystem->getConfig( 'cookie_path', '/' ).'; domain='.$gBitSystem->getConfig( 'cookie_domain' ).' Set-Cookie: <strong>'.$gBitUser->getSiteCookieName().'=2ishv84g637mrp7o07hd8829f6M</strong>; path=/ </code>', ), @@ -84,7 +84,7 @@ Access-Control-Allow-Origin: * Client-Date: Thu, 19 Jul 2012 21:50:07 GMT Client-Peer: 66.179.240.119:443 Client-Response-Num: 1 -Set-Cookie: BWSESSION=2ishv84g637mrp7o07hd8829f6; path='.$gBitSystem->getConfig( 'cookie_path', '/' ).'; domain='.$gBitSystem->getConfig( 'cookie_domain', $cookieDomain ).' +Set-Cookie: BWSESSION=2ishv84g637mrp7o07hd8829f6; path='.$gBitSystem->getConfig( 'cookie_path', '/' ).'; domain='.$gBitSystem->getConfig( 'cookie_domain' ).' Set-Cookie: <strong>'.$gBitUser->getSiteCookieName().'=2ishv84g637mrp7o07hd8829f6M</strong>; path=/ X-Powered-By: PHP/5.3.1 diff --git a/admin/assign_role_user.php b/admin/assign_role_user.php index 47cffcd..c4e671b 100644 --- a/admin/assign_role_user.php +++ b/admin/assign_role_user.php @@ -14,7 +14,7 @@ if (!$gBitUser->userExists( array( 'user_id' => $_REQUEST["assign_user"] ) ) ) { $gBitSystem->fatalError( tra( "User doesnt exist" )); } -$assignUser = new BitPermUser( $_REQUEST["assign_user"] ); +$assignUser = new RolePermUser( $_REQUEST["assign_user"] ); $assignUser->load( TRUE ); if( $assignUser->isAdmin() && !$gBitUser->isAdmin() ) { diff --git a/admin/index.php b/admin/index.php index 30f542f..22d25ba 100644 --- a/admin/index.php +++ b/admin/index.php @@ -14,8 +14,11 @@ $feedback = array(); if( isset($_REQUEST["newuser"] ) ) { $userRecord = $_REQUEST; - $newUser = new BitPermUser(); - + if ( defined( 'ROLE_MODEL' ) ) { + $newUser = new RolePermUser(); + } else { + $newUser = new BitPermUser(); + } if( $newUser->importUser( $userRecord ) ) { $gBitSmarty->assign( 'addSuccess', "User Added Successfully" ); if( empty( $_REQUEST['admin_noemail_user'] ) ) { @@ -57,7 +60,7 @@ if( isset($_REQUEST["newuser"] ) ) { $title = 'Find Users'; } // Process actions here -// Remove user or remove user from group +// Remove user or remove user from team if( isset( $_REQUEST["action"] ) ) { $formHash['action'] = $_REQUEST['action']; if( !empty( $_REQUEST['batch_user_ids'] ) && is_array( $_REQUEST['batch_user_ids'] ) ) { @@ -154,15 +157,26 @@ if( isset( $_REQUEST["action"] ) ) { $feedback['error'][] = tra( 'User not found' ); } } + if ($_REQUEST["action"] == 'removerole') { + $gBitUser->removeUserFromRole($_REQUEST["user"], $_REQUEST["role"]); + } if ($_REQUEST["action"] == 'removegroup') { $gBitUser->removeUserFromGroup($_REQUEST["user"], $_REQUEST["group"]); } } -// get default group and pass it to tpl -foreach( $gBitUser->getDefaultGroup() as $defaultGroupId => $defaultGroupName ) { - $gBitSmarty->assign('defaultGroupId', $defaultGroupId ); - $gBitSmarty->assign('defaultGroupName', $defaultGroupName ); +if ( defined( 'ROLE_MODEL' ) ) { + // get default role and pass it to tpl + foreach( $gBitUser->getDefaultRole() as $defaultRoleId => $defaultRoleName ) { + $gBitSmarty->assign('defaultRoleId', $defaultRoleId ); + $gBitSmarty->assign('defaultRoleName', $defaultRoleName ); + } +} else { + // get default group and pass it to tpl + foreach( $gBitUser->getDefaultGroup() as $defaultGroupId => $defaultGroupName ) { + $gBitSmarty->assign('defaultGroupId', $defaultGroupId ); + $gBitSmarty->assign('defaultGroupName', $defaultGroupName ); + } } // override default max_records @@ -178,13 +192,20 @@ if (isset($_REQUEST["numrows"])) { $_REQUEST['listInfo']["URL"] = USERS_PKG_URL."admin/index.php"; $gBitSmarty->assign_by_ref('listInfo', $_REQUEST['listInfo']); -// invoke edit service for the add user feature -$userObj = new BitPermUser(); -$userObj->invokeServices( 'content_edit_function' ); - -// Get groups (list of groups) -$grouplist = $gBitUser->getGroups('', '', 'group_name_asc'); -$gBitSmarty->assign( 'grouplist', $grouplist ); +if ( defined( 'ROLE_MODEL' ) ) { + // invoke edit service for the add user feature + $userObj = new RolePermUser(); + $userObj->invokeServices( 'content_edit_function' ); + // Get roles (list of roles) + $rolelist = $gBitUser->getRoles('', '', 'role_name_asc'); + $gBitSmarty->assign( 'rolelist', $rolelist ); +} else { + // invoke edit service for the add user feature + $userObj = new BitPermUser(); + $userObj->invokeServices( 'content_edit_function' ); // Get groups (list of groups) + $grouplist = $gBitUser->getGroups('', '', 'group_name_asc'); + $gBitSmarty->assign( 'grouplist', $grouplist ); +} $gBitSmarty->assign( 'feedback', $feedback ); $gBitSmarty->assign( (!empty( $_REQUEST['tab'] ) ? $_REQUEST['tab'] : 'userlist').'TabSelect', 'tdefault' ); diff --git a/admin/schema_inc.php b/admin/schema_inc.php index ee95e1d..07661fe 100644 --- a/admin/schema_inc.php +++ b/admin/schema_inc.php @@ -1,5 +1,104 @@ <?php +if ( defined( 'ROLE_MODEL' ) ) { +$tables = array( + +'users_users' => " + user_id I4 PRIMARY, + content_id I4, + email C(200), + login C(40), + real_name C(64), + user_password C(32), + provpass C(32), + provpass_expires I8, + default_role_id I4, + last_login I8, + current_login I8, + registration_date I8 NOTNULL, + challenge C(32), + pass_due I8, + hash C(32), + created I8, + avatar_attachment_id I4, + portrait_attachment_id I4, + logo_attachment_id I4 + CONSTRAINT ', CONSTRAINT `users_avatar_attach_ref` FOREIGN KEY (`avatar_attachment_id`) REFERENCES `".BIT_DB_PREFIX."liberty_attachments` (`attachment_id`) + , CONSTRAINT `users_content_ref` FOREIGN KEY (`content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content` (`content_id`) + , CONSTRAINT `users_portrait_attach_ref` FOREIGN KEY (`portrait_attachment_id`) REFERENCES `".BIT_DB_PREFIX."liberty_attachments` (`attachment_id`) + , CONSTRAINT `users_logo_attach_ref` FOREIGN KEY (`logo_attachment_id`) REFERENCES `".BIT_DB_PREFIX."liberty_attachments` (`attachment_id`)' +", + +'users_favorites_map' => " + favorite_content_id I4 PRIMARY, + user_id I4 PRIMARY, + map_position I4 + CONSTRAINT ', CONSTRAINT `users_fav_user_ref` FOREIGN KEY (`user_id`) REFERENCES `".BIT_DB_PREFIX."users_users` (`user_id`) + , CONSTRAINT `users_fav_con_ref` FOREIGN KEY (`favorite_content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content` (`content_id`)' + ' +", + +'users_permissions' => " + perm_name C(30) PRIMARY, + perm_desc C(250), + perm_level C(80), + package C(100) +", + +'users_roles' => " + role_id I4 PRIMARY, + user_id I4 NOTNULL, + role_name C(30), + is_default C(1), + role_desc C(255), + role_home C(255), + is_public C(1), + after_registration_page C(255) + CONSTRAINT ', CONSTRAINT `users_roles_user_ref` FOREIGN KEY (`user_id`) REFERENCES `".BIT_DB_PREFIX."users_users` (`user_id`)' +", + +'users_role_permissions' => " + role_id I4 PRIMARY, + perm_name C(30) PRIMARY, + perm_value C(1) default '' + CONSTRAINT ', CONSTRAINT `users_role_perm_role_ref` FOREIGN KEY (`role_id`) REFERENCES `".BIT_DB_PREFIX."users_roles` (`role_id`) + , CONSTRAINT `users_role_perm_perm_ref` FOREIGN KEY (`perm_name`) REFERENCES `".BIT_DB_PREFIX."users_permissions` (`perm_name`)' +", + +'users_roles_map' => " + user_id I4 PRIMARY, + role_id I4 PRIMARY + CONSTRAINT ', CONSTRAINT `users_roles_map_role_ref` FOREIGN KEY (`role_id`) REFERENCES `".BIT_DB_PREFIX."users_roles` (`role_id`) + , CONSTRAINT `users_roles_map_user_ref` FOREIGN KEY (`user_id`) REFERENCES `".BIT_DB_PREFIX."users_users` (`user_id`)' +", + +'users_cnxn' => " + user_id I4, + cookie C(64), + ip C(39), + last_get I8, + connect_time I8, + get_count I8, + user_agent C(128), + assume_user_id I4, + current_view X + CONSTRAINT ', CONSTRAINT `users_cnxn_user_ref` FOREIGN KEY (`user_id`) REFERENCES `".BIT_DB_PREFIX."users_users` (`user_id`)' +", + +'users_watches' => " + user_id I4 PRIMARY, + event C(40) PRIMARY, + object C(120) PRIMARY, + hash C(32), + title C(250), + watch_type C(200), + url C(250), + email C(200) + CONSTRAINT ', CONSTRAINT `users_watches_user_ref` FOREIGN KEY (`user_id`) REFERENCES `".BIT_DB_PREFIX."users_users` (`user_id`)' +", + +); +} else { $tables = array( 'users_users' => " @@ -96,8 +195,7 @@ $tables = array( CONSTRAINT ', CONSTRAINT `users_watches_user_ref` FOREIGN KEY (`user_id`) REFERENCES `".BIT_DB_PREFIX."users_users` (`user_id`)' ", -); - +);} global $gBitInstaller; foreach( array_keys( $tables ) AS $tableName ) { @@ -108,30 +206,50 @@ $indices = array ( 'users_users_email_idx' => array( 'table' => 'users_users', 'cols' => 'email', 'opts' => array('UNIQUE') ), 'users_users_login_idx' => array( 'table' => 'users_users', 'cols' => 'login', 'opts' => array('UNIQUE') ), 'users_users_avatar_atment_idx' => array( 'table' => 'users_users', 'cols' => 'avatar_attachment_id', 'opts' => NULL ), - 'users_groups_user_idx' => array( 'table' => 'users_groups', 'cols' => 'user_id', 'opts' => NULL ), - 'users_groups_user_name_idx' => array( 'table' => 'users_groups', 'cols' => 'user_id,group_name', 'opts' => array('UNIQUE') ), - 'users_group_perm_group_idx' => array( 'table' => 'users_group_permissions', 'cols' => 'group_id', 'opts' => NULL ), - 'users_group_perm_perm_idx' => array( 'table' => 'users_group_permissions', 'cols' => 'perm_name', 'opts' => NULL ), - 'users_groups_map_user_idx' => array( 'table' => 'users_groups_map', 'cols' => 'user_id', 'opts' => NULL ), - 'users_groups_map_group_idx' => array( 'table' => 'users_groups_map', 'cols' => 'group_id', 'opts' => NULL ), 'users_fav_con_idx' => array( 'table' => 'users_favorites_map', 'cols' => 'favorite_content_id', 'opts' => NULL ), 'users_fav_user_idx' => array( 'table' => 'users_favorites_map', 'cols' => 'user_id', 'opts' => NULL ) ); +if ( defined( 'ROLE_MODEL' ) ) { + $team_indices = array ( + 'users_roles_user_idx' => array( 'table' => 'users_roles', 'cols' => 'user_id', 'opts' => NULL ), + 'users_roles_user_name_idx' => array( 'table' => 'users_roles', 'cols' => 'user_id,role_name', 'opts' => array('UNIQUE') ), + 'users_role_perm_role_idx' => array( 'table' => 'users_role_permissions', 'cols' => 'role_id', 'opts' => NULL ), + 'users_role_perm_perm_idx' => array( 'table' => 'users_role_permissions', 'cols' => 'perm_name', 'opts' => NULL ), + 'users_roles_map_user_idx' => array( 'table' => 'users_roles_map', 'cols' => 'user_id', 'opts' => NULL ), + 'users_roles_map_role_idx' => array( 'table' => 'users_roles_map', 'cols' => 'role_id', 'opts' => NULL ) + ); +} else { + $team_indices = array ( + 'users_groups_user_idx' => array( 'table' => 'users_groups', 'cols' => 'user_id', 'opts' => NULL ), + 'users_groups_user_name_idx' => array( 'table' => 'users_groups', 'cols' => 'user_id,group_name', 'opts' => array('UNIQUE') ), + 'users_group_perm_group_idx' => array( 'table' => 'users_group_permissions', 'cols' => 'group_id', 'opts' => NULL ), + 'users_group_perm_perm_idx' => array( 'table' => 'users_group_permissions', 'cols' => 'perm_name', 'opts' => NULL ), + 'users_groups_map_user_idx' => array( 'table' => 'users_groups_map', 'cols' => 'user_id', 'opts' => NULL ), + 'users_groups_map_group_idx' => array( 'table' => 'users_groups_map', 'cols' => 'group_id', 'opts' => NULL ) + ); +} - +$indices = array_merge( $indices, $team_indices ); $gBitInstaller->registerSchemaIndexes( USERS_PKG_NAME, $indices ); $gBitInstaller->registerPackageInfo( USERS_PKG_NAME, array( - 'description' => "The users package contains all user information and gives you the possiblity to assign permissions to groups of users.", + 'description' => "The users package contains all user information and gives you the possiblity to assign permissions to roles of users.", 'license' => '<a href="http://www.gnu.org/licenses/licenses.html#LGPL">LGPL</a>', ) ); // ### Sequences -$sequences = array ( - 'users_users_user_id_seq' => array( 'start' => 2 ), - 'users_groups_id_seq' => array( 'start' => 4 ) -); +if ( defined( 'ROLE_MODEL' ) ) { + $sequences = array ( + 'users_users_user_id_seq' => array( 'start' => 2 ), + 'users_roles_id_seq' => array( 'start' => 4 ) + ); +} else { + $sequences = array ( + 'users_users_user_id_seq' => array( 'start' => 2 ), + 'users_groups_id_seq' => array( 'start' => 4 ) + ); +} $gBitInstaller->registerSchemaSequences( USERS_PKG_NAME, $sequences ); // ### Default Preferences @@ -182,15 +300,16 @@ $gBitInstaller->registerPreferences( USERS_PKG_NAME, array( array(USERS_PKG_NAME,'users_display_name','real_name'), array(USERS_PKG_NAME,'users_change_language','y'), array(USERS_PKG_NAME,'users_case_sensitive_login','y'), +// array(USERS_PKG_NAME,'user_class','RolePermUser'), //array(USERS_PKG_NAME, 'users_watches','n'), ) ); // ### Default Permissions $gBitInstaller->registerUserPermissions( USERS_PKG_NAME, array( //array('p_tidbits_upload_userfiles', 'Can upload personal files', 'registered', USERS_PKG_NAME), - array('p_users_assign_group_perms', 'Can assign permissions to personal groups', 'editors', USERS_PKG_NAME), - array('p_users_assign_group_members', 'Can assign users to personal groups', 'registered', USERS_PKG_NAME), - array('p_users_group_subgroups', 'Can include other groups in groups', 'editors', USERS_PKG_NAME), + array('p_users_assign_role_perms', 'Can assign permissions to personal roles', 'editors', USERS_PKG_NAME), + array('p_users_assign_role_members', 'Can assign users to personal roles', 'registered', USERS_PKG_NAME), + array('p_users_role_subroles', 'Can include other roles in roles', 'editors', USERS_PKG_NAME), //array('p_tidbits_create_bookmarks', 'Can create user bookmarksche user bookmarks', 'registered', USERS_PKG_NAME), //array('p_tidbits_configure_modules', 'Can configure modules', 'registered', USERS_PKG_NAME), //array('p_tidbits_cache_bookmarks', 'Can cache user bookmarks', 'admin', USERS_PKG_NAME), @@ -201,7 +320,7 @@ $gBitInstaller->registerUserPermissions( USERS_PKG_NAME, array( //array('p_tidbits_custom_home_theme', 'Can modify user homepage theme', 'editors', USERS_PKG_NAME), //array('p_tidbits_custom_home_layout', 'Can modify user homepage layout', 'editors', USERS_PKG_NAME), //array('p_tidbits_use_custom_css', 'Can create custom style sheets', 'editors', USERS_PKG_NAME), - array('p_users_create_personal_groups', 'Can create personal user groups', 'editors', USERS_PKG_NAME), + array('p_users_create_personal_roles', 'Can create personal user roles', 'editors', USERS_PKG_NAME), array('p_users_view_user_list', 'Can view list of registered users', 'registered', USERS_PKG_NAME), array('p_users_view_user_homepage', 'Can view personalized homepages', 'basic', USERS_PKG_NAME), array('p_users_edit_user_homepage', 'Can create and display a personalized homepage', 'registered', USERS_PKG_NAME), diff --git a/admin/users_import.php b/admin/users_import.php index 4f7cc88..3eb4af4 100644 --- a/admin/users_import.php +++ b/admin/users_import.php @@ -58,6 +58,15 @@ if( isset( $_REQUEST["batchimport"])) { } } } + if( !empty( $userRecord['roles'] ) ) { + // roles need to be separated by spaces since this is a csv file + $roles = explode( " ", $userRecord['roles'] ); + foreach( $roles as $role ) { + if( $roleId = $gBitUser->roleExists( $role, ROOT_USER_ID ) ) { + $newUser->addUserToRole( $newUser->mUserId, $roleId ); + } + } + } if( empty( $_REQUEST['admin_noemail_user'] ) ) { $ret = users_admin_email_user( $userRecord ); if( is_array( $ret ) ) { @@ -84,10 +93,18 @@ if( isset( $_REQUEST["batchimport"])) { } } -// get default group and pass it to tpl -foreach( $gBitUser->getDefaultGroup() as $defaultGroupId => $defaultGroupName ) { - $gBitSmarty->assign('defaultGroupId', $defaultGroupId ); - $gBitSmarty->assign('defaultGroupName', $defaultGroupName ); +if ( defined( 'ROLE_MODEL' ) ) { + // get default role and pass it to tpl + foreach( $gBitUser->getDefaultRole() as $defaultRoleId => $defaultRoleName ) { + $gBitSmarty->assign('defaultRoleId', $defaultRoleId ); + $gBitSmarty->assign('defaultRoleName', $defaultRoleName ); + } +} else { + // get default group and pass it to tpl + foreach( $gBitUser->getDefaultGroup() as $defaultGroupId => $defaultGroupName ) { + $gBitSmarty->assign('defaultGroupId', $defaultGroupId ); + $gBitSmarty->assign('defaultGroupName', $defaultGroupName ); + } } // Display the template diff --git a/admin/verify_emails_role.php b/admin/verify_emails_role.php new file mode 100644 index 0000000..f9738c8 --- /dev/null +++ b/admin/verify_emails_role.php @@ -0,0 +1,38 @@ +<?php +// $Header$ +// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. +// All Rights Reserved. See below for details and a complete list of authors. +// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details. +// Initialization +require_once( '../../kernel/setup_inc.php' ); + + + $gBitUser->verifyTicket(); + + $whereSql = ''; + $bindVars = array( $gBitSystem->getConfig('users_validate_email_role') ); + if( !empty( $_REQUEST['start_user_id'] ) ) { + $whereSql = " AND user_id>?"; + $bindVars[] = $_REQUEST['start_user_id']; + } + + $selectSql = "SELECT uu.user_id,uu.email FROM users_users uu WHERE user_id NOT IN (SELECT user_id FROM users_roles_map WHERE role_id = ?) $whereSql ORDER BY uu.user_id"; + $users = $gBitDb->getAssoc($selectSql, $bindVars ); + $errors; + foreach ( $users as $id=>$email ){ + print date( "Y-m-d H:i:s" )." Verifying $email ( $id ) .... "; + flush(); + $emailStatus = $gBitUser->verifyMx($email,$errors); + if( $emailStatus === true){ + $gBitUser->addUserToRole( $id , $gBitSystem->getConfig('users_validate_email_role') ); + print "valid"; + } elseif( $emailStatus === -1 ) { + print "MX connection failed"; + } else { + print " --INVALID-- "; + } + print "<br/>\n"; + flush(); + } + + diff --git a/auth/ldap/auth.php b/auth/ldap/auth.php index f9063d4..07afadc 100644 --- a/auth/ldap/auth.php +++ b/auth/ldap/auth.php @@ -29,31 +29,31 @@ class LDAPAuth extends BaseAuth { function validate($user,$pass,$challenge,$response) { parent::validate($user,$pass,$challenge,$response); global $gBitDb; - + if ( empty($user) or empty($pass) ) { return USER_NOT_FOUND; } $this->mInfo["real_name"] = ''; // This needs fixing in the base code - real_name will only exist if a user has been identiied - + // Use V3, which requires UTF-8: $this->mConfig['version'] = 3; $user_utf8 = utf8_encode( $user ); - + if ( $this->mConfig['reqcert'] ) { // Skip the SSL certificate check: // (This assumes PHP is using the OpenLDAP client library.) putenv('LDAPTLS_REQCERT=never'); } - - if ( $this->mConfig['activedirectory'] ) { + + if ( $this->mConfig['activedirectory'] ) { $this->mConfig['attributes'] = (array) null; $this->mConfig['userfilter'] = '(objectClass='.$this->mConfig['useroc'].')'; $this->mConfig['groupfilter'] = '(objectClass='.$this->mConfig['groupoc'].')'; $this->mConfig['groupscope'] = $this->mConfig['userscope']; } else { // Using bitweaver groups with LDAP still needs completing so disable for now - unset($this->mConfig['group']); + unset($this->mConfig['group']); } $a = new Auth('LDAP', $this->mConfig, "", false); @@ -77,9 +77,9 @@ class LDAPAuth extends BaseAuth { return PASSWORD_INCORRECT; } } - - // At this point, there was a successful ldap_bind() using the - // user's Distinguished Name (DN) and password for login. + + // At this point, there was a successful ldap_bind() using the + // user's Distinguished Name (DN) and password for login. // The call to ldap_get_attributes() has been saved into $a->getAuthData('attributes') if ( $this->mConfig['activedirectory'] ) { @@ -88,21 +88,21 @@ class LDAPAuth extends BaseAuth { // Warning: ldap_get_attributes() uses case-sensitive array keys $this->mInfo["login"] = $attributes[ $this->mConfig['userattr'] ]; $this->mInfo["email"] = $attributes[ $this->mConfig['email'] ]; - $this->mInfo["real_name"] = empty($attributes[$this->mConfig['name']]) ? $this->mInfo["login"] : $attributes[$this->mConfig['name']]; + $this->mInfo["real_name"] = empty($attributes[$this->mConfig['name']]) ? $this->mInfo["login"] : $attributes[$this->mConfig['name']]; } else { $attributes = $a->getAuthData('attributes'); // Warning: ldap_get_attributes() uses case-sensitive array keys $this->mInfo["login"] = $attributes[ $this->mConfig['userattr'] ][0]; $this->mInfo["email"] = $attributes[ $this->mConfig['email'] ][0]; - $this->mInfo["real_name"] = empty($attributes[$this->mConfig['name']][0]) ? $this->mInfo["login"] : $attributes[$this->mConfig['name']][0]; + $this->mInfo["real_name"] = empty($attributes[$this->mConfig['name']][0]) ? $this->mInfo["login"] : $attributes[$this->mConfig['name']][0]; } // Note, the new (or updated) SQL user will be created by the calling BitUser class. return USER_VALID; // Success! - + } - + function isSupported() { $ret = true; if (!class_exists("Auth")) { @@ -142,8 +142,12 @@ class LDAPAuth extends BaseAuth { function getSettings() { global $gBitUser; $listHash = array(); - $groups = $gBitUser->getAllGroups($listHash); - $groupsD =array(); + + // Roles are not inteneded to match with ldap groups + // This area needs a closer look if it needs to be used + $groups = array(); + if ( !defined ('ROLE_MODEL') ) $groups = $gBitUser->getAllGroups($listHash); + $groupsD = array(); foreach ($groups as $g) { $groupsD[$g['group_id']]= "{$g['group_name']} ( {$g['group_desc']} )"; } diff --git a/bit_setup_inc.php b/bit_setup_inc.php index 93d99c8..01096ae 100644 --- a/bit_setup_inc.php +++ b/bit_setup_inc.php @@ -40,7 +40,7 @@ if( !defined( 'LOGO_MAX_DIM' )) { } // a package can decide to override the default user class -$userClass = $gBitSystem->getConfig( 'user_class', 'BitPermUser' ); +$userClass = $gBitSystem->getConfig( 'user_class', (defined('ROLE_MODEL') ) ? 'RolePermUser' : 'BitPermUser' ); require_once( USERS_PKG_PATH . $userClass .'.php' ); $gBitUser = new $userClass(); diff --git a/my_groups.php b/my_groups.php index 59597fb..1b88cc2 100644 --- a/my_groups.php +++ b/my_groups.php @@ -22,12 +22,11 @@ global $gBitUser, $gBitSystem; // PERMISSIONS: registered user required if ( !$gBitUser->isRegistered() ) { - $gBitSystem->fatalError( tra( "You are not logged in." )); + $gBitSystem->fatalError( tra( "You are not logged in." )); } if( !empty( $_REQUEST["cancel"] ) ) { - header( 'Location: '.USERS_PKG_URL.'my_groups.php' ); - die; + bit_redirect( USERS_PKG_URL.'my_groups.php' ); } if ( $gBitUser->hasPermission('p_users_create_personal_groups' ) ) { @@ -41,7 +40,7 @@ if ( $gBitUser->hasPermission('p_users_create_personal_groups' ) ) { $listHash = array( 'sort_mode' => !empty( $_REQUEST['sort_mode'] ) ? $_REQUEST['sort_mode'] : 'group_name_asc' ); $groupList = $gBitUser->getAllGroups( $listHash ); } - + // Remember a package limit if it is set. $gBitSmarty->assign( 'package',isset( $_REQUEST['package'] ) ? $_REQUEST['package'] : 'all' ); @@ -119,7 +118,7 @@ if ( $gBitUser->hasPermission('p_users_create_personal_groups' ) ) { // get grouplist separately from the $users stuff to avoid splitting of data due to pagination $listHash = array( 'sort_mode' => 'group_name_asc' ); $groupList = $gBitUser->getAllUserGroups(); - + if( !empty( $_REQUEST['group_id'] ) ) { // we don't want our own group listed when editing if( !empty( $groupList[$_REQUEST['group_id']] ) ) { @@ -132,7 +131,7 @@ if ( $gBitUser->hasPermission('p_users_create_personal_groups' ) ) { $gBitSmarty->assign_by_ref( 'allPerms', $allPerms ); $gBitSystem->setBrowserTitle( 'Admininster Group: '.$groupInfo['group_name'].' '.(isset( $_REQUEST['tab'] ) ? $_REQUEST['tab'] : '') ); $mid = 'bitpackage:users/my_group_edit.tpl'; - } + } $gBitSmarty->assign('groups', $groupList); // $gBitSmarty->assign( (!empty( $_REQUEST['tab'] ) ? $_REQUEST['tab'] : 'edit').'TabSelect', 'tdefault' ); @@ -147,7 +146,7 @@ if ( ( !empty( $_REQUEST['add_public_group'] ) || !empty( $_REQUEST['remove_publ } else { $errorMsg[] = tra("You can't leave this group."); - } + } } elseif ( !empty( $_REQUEST['add_public_group'] ) ) { $gBitUser->addUserToGroup( $gBitUser->mUserId, $_REQUEST['public_group_id'] ); } elseif ( !empty( $_REQUEST['remove_public_group'] ) ) { @@ -162,8 +161,7 @@ if ( ( !empty( $_REQUEST['add_public_group'] ) || !empty( $_REQUEST['remove_publ } else { $url = $groupInfo['after_registration_page']; } - header( 'Location: '.$url ); - exit; + bit_redirect( $url ); } } @@ -174,7 +172,7 @@ $listHash = array( 'is_public'=>'y', 'sort_mode' => array( 'is_default_asc', 'group_desc_asc' ), ); -$publicGroups = $gBitUser->getAllGroups( $listHash ); +$publicGroups = $gBitUser->getAllGroups( $listHash ); if( count( $publicGroups )) { foreach ( $systemGroups as $groupId=>$groupInfo ) { foreach ( $publicGroups as $key=>$publicGroup) { @@ -200,7 +198,7 @@ if( count( $publicGroups )) { } } -// Remember error and success messages. +// Remember error and success messages. if (!empty($errorMsg)) { $gBitSmarty->assign('errorMsg',$errorMsg); } diff --git a/templates/admin_assign_role_user.tpl b/templates/admin_assign_role_user.tpl index 14ab785..48ded6a 100644 --- a/templates/admin_assign_role_user.tpl +++ b/templates/admin_assign_role_user.tpl @@ -10,7 +10,7 @@ </div> <div class="body"> - {form legend="User Information" action="`$smarty.const.USERS_PKG_URL`admin/assign_user.php"} + {form legend="User Information" action="`$smarty.const.USERS_PKG_URL`admin/assign_role_user.php"} <input type="hidden" value="{$assignUser->mUserId}" name="assign_user" /> <div class="row"> @@ -52,7 +52,7 @@ <a href="{$smarty.const.USERS_PKG_URL}admin/edit_role.php?role_id={$roleId}">{$role.role_name}</a> {if $roleId eq $assignUser->mInfo.default_role_id}</strong>{/if} {if $roleId != -1} - <a href="{$smarty.const.USERS_PKG_URL}admin/assign_user.php?action=removerole&role_id={$roleId}&assign_user={$assignUser->mUserId}">{biticon ipackage="icons" iname="edit-delete" iexplain="remove from role" iforce="icon"}</a> + <a href="{$smarty.const.USERS_PKG_URL}admin/assign_role_user.php?action=removerole&role_id={$roleId}&assign_user={$assignUser->mUserId}">{biticon ipackage="icons" iname="edit-delete" iexplain="remove from role" iforce="icon"}</a> {/if} <br /> {/foreach} @@ -79,8 +79,8 @@ <table class="data"> <tr> - <th><a href="{$smarty.const.USERS_PKG_URL}admin/assign_user.php?assign_user={$assignUser->mUserId}&offset={$offset}&sort_mode={if $sort_mode eq 'role_name_desc'}role_name_asc{else}role_name_desc{/if}">{tr}Role Name{/tr}</a></th> - <th><a href="{$smarty.const.USERS_PKG_URL}admin/assign_user.php?assign_user={$assignUser->mUserId}&offset={$offset}&sort_mode={if $sort_mode eq 'role_desc_desc'}role_desc_asc{else}role_desc_desc{/if}">{tr}Description{/tr}</a></th> + <th><a href="{$smarty.const.USERS_PKG_URL}admin/assign_role_user.php?assign_user={$assignUser->mUserId}&offset={$offset}&sort_mode={if $sort_mode eq 'role_name_desc'}role_name_asc{else}role_name_desc{/if}">{tr}Role Name{/tr}</a></th> + <th><a href="{$smarty.const.USERS_PKG_URL}admin/assign_role_user.php?assign_user={$assignUser->mUserId}&offset={$offset}&sort_mode={if $sort_mode eq 'role_desc_desc'}role_desc_asc{else}role_desc_desc{/if}">{tr}Description{/tr}</a></th> <th>{tr}action{/tr}</th> </tr> {cycle values="even,odd" print=false} @@ -90,7 +90,7 @@ <td>{$role.role_name}</td> <td>{$role.role_desc}</td> <td class="actionicon"> - <a href="{$smarty.const.USERS_PKG_URL}admin/assign_user.php?offset={$offset}&sort_mode={$sort_mode}&action=assign&role_id={$roleId}&assign_user={$assignUser->mUserId}"> + <a href="{$smarty.const.USERS_PKG_URL}admin/assign_role_user.php?offset={$offset}&sort_mode={$sort_mode}&action=assign&role_id={$roleId}&assign_user={$assignUser->mUserId}"> {biticon ipackage="icons" iname="emblem-shared" iexplain="assign" iforce="icon"} </a> </td> diff --git a/templates/admin_groups_list.tpl b/templates/admin_groups_list.tpl index 98f52e1..44d10af 100644 --- a/templates/admin_groups_list.tpl +++ b/templates/admin_groups_list.tpl @@ -24,7 +24,7 @@ <div class="floaticon"> {smartlink ititle="Edit" ipackage="users" ifile="admin/edit_group.php" ibiticon="icons/accessories-text-editor" group_id=$groupId} {smartlink ititle="Group Members" ipackage="users" ifile="admin/edit_group.php" ibiticon="icons/system-users" members=$groupId} - {if $groupId ne $smarty.const.ANONYMOUS_GROUP_ID} + {if $groupId ne $smarty.const.ANONYMOUS_TEAM_ID} {smartlink ititle="Batch assign" ipackage="users" ifile="admin/edit_group.php" ibiticon="icons/application-x-executable" batch_assign=$groupId} {smartlink ititle="Remove" ipackage="users" ifile="admin/edit_group.php" ibiticon="icons/edit-delete" action=delete group_id=$groupId} {/if} diff --git a/templates/admin_login.tpl b/templates/admin_login.tpl index 8095e2f..c525bff 100644 --- a/templates/admin_login.tpl +++ b/templates/admin_login.tpl @@ -92,18 +92,33 @@ </div> <div class="row"> - {formlabel label="Groups choice at registration" for="registration_group_choice"} - {forminput} - <select name="registration_group_choice[]" multiple="multiple" size="5"> - <option value=""> </option> - {foreach key=g item=gr from=$groupList} - {if $gr.group_id ne -1} - <option value="{$gr.group_id}" {if $gr.is_public eq 'y'} selected="selected"{/if}>{$gr.group_name|truncate:"52":" ..."}</option> - {/if} - {/foreach} - </select> - {formhelp note="A user will be able to select one of the selected group at registration. If you select the default group (Registered), he will not be obliged to select a group."} - {/forminput} + {if $roleList } + {formlabel label="Roles choice at registration" for="registration_role_choice"} + {forminput} + <select name="registration_role_choice[]" multiple="multiple" size="5"> + <option value=""> </option> + {foreach key=r item=ro from=$roleList} + {if $ro.role_id ne -1} + <option value="{$ro.role_id}" {if $ro.is_public eq 'y'} selected="selected"{/if}>{$ro.role_name|truncate:"52":" ..."}</option> + {/if} + {/foreach} + </select> + {formhelp note="A user will be able to select one of the selected roles at registration. If you select the default role (Registered), he will not be obliged to select a role."} + {/forminput} + {else} + {formlabel label="Groups choice at registration" for="registration_group_choice"} + {forminput} + <select name="registration_group_choice[]" multiple="multiple" size="5"> + <option value=""> </option> + {foreach key=g item=gr from=$groupList} + {if $gr.group_id ne -1} + <option value="{$gr.group_id}" {if $gr.is_public eq 'y'} selected="selected"{/if}>{$gr.group_name|truncate:"52":" ..."}</option> + {/if} + {/foreach} + </select> + {formhelp note="A user will be able to select one of the selected group at registration. If you select the default group (Registered), he will not be obliged to select a group."} + {/forminput} + {/if} </div> <div class="row submit"> diff --git a/templates/admin_login_role.tpl b/templates/admin_login_role.tpl new file mode 100644 index 0000000..4040658 --- /dev/null +++ b/templates/admin_login_role.tpl @@ -0,0 +1,198 @@ +{jstabs} + {jstab title="User Registration and Login"} + {form legend="User Registration and Login"} + <input type="hidden" name="page" value="{$page}" /> + + <div class="row"> + {formfeedback hash=$authSettings.err} + + {formlabel label="Authentication method"} + + {forminput} + {foreach from=$authSettings.avail_method item='auth_method' key='iter'} + <label>Method {$iter+1} + <select name="users_auth_method_{$iter}"> + <option value="" {if $auth_method.value eq ''} selected="selected"{/if}>-</option> + {foreach from=$authSettings.avail item='method' key='meth_name'} + <option value="{$meth_name}" {if $auth_method.value eq $meth_name} selected="selected"{/if}>{$method.name}</option> + {/foreach} + </select> + </label> + <br /> + {/foreach} + {* + {if $gBitSystem->getConfig("users_auth_method_`$smarty.section.auth_select_outer.iteration-1`") eq 'tiki'} selected="selected"{/if} + <select name="users_auth_method" id="users_auth_method"> + <option value="tiki" {if $gBitSystem->getConfig('users_auth_method') eq 'tiki'} selected="selected"{/if}>{tr}Just bitweaver{/tr}</option> + <option value="ws" {if $gBitSystem->getConfig('users_auth_method') eq 'ws'} selected="selected"{/if}>{tr}Web Server{/tr}</option> + {if $ldapEnabled}<option value="auth" {if $gBitSystem->getConfig('users_auth_method') eq 'auth'} selected="selected"{/if}>{tr}bitweaver and PEAR::Auth{/tr}</option>{/if} + </select> + *} + {*formhelp note="Registration requrires that Bitweaver Auth be in the Method List"*} + {/forminput} + </div> + + {foreach from=$loginSettings key=feature item=output} + <div class="row"> + {if $feature == 'users_validate_email' && !$gBitSystem->hasValidSenderEmail()} + {formfeedback error="Site <a href=\"`$smarty.const.BIT_ROOT_URL`kernel/admin/index.php?page=server\">emailer return address</a> is not valid!"} + {/if} + {if $feature == 'users_random_number_reg'} + {formfeedback warning=$warning} + {/if} + {formlabel label=`$output.label` for=$feature} + {forminput} + {if $output.type == 'text'} + {if $feature eq 'cookie_domain' && $gBitSystem->getConfig($feature) eq ''} + <input type="text" size="50" name="{$feature}" id="{$feature}" value="{$smarty.server.SERVER_NAME}" /> + {elseif $feature eq 'cookie_path' && $gBitSystem->getConfig($feature) eq ''} + <input type="text" size="50" name="{$feature}" id="{$feature}" value="{$smarty.const.BIT_ROOT_URL}" /> + {else} + <input type="text" size="50" name="{$feature}" id="{$feature}" value="{$gBitSystem->getConfig($feature)|escape}" /> + {/if} + {else} + {html_checkboxes name="$feature" values="y" checked=$gBitSystem->getConfig($feature) labels=false id=$feature} + {/if} + {formhelp note=`$output.note` page=`$output.page` link=`$output.link`} + {/forminput} + </div> + {/foreach} + + <div class="row"> + {formlabel label="Default role for users with verifiable emails" for="users_validate_email_role"} + {forminput} + + <select name="users_validate_email_role" id="users_validate_email_role"> + <option value="(none)" {if $gBitSystem->getConfig('users_validate_email_role') eq ''} selected="selected"{/if}>(none)</option> + {foreach from=$roles item='role'} + <option value="{$role.role_id}" {if $gBitSystem->getConfig('users_validate_email_role') eq $role.role_id} selected="selected"{/if}>{$role.role_name}</option> + {/foreach} + </select> + <div class="formhelp">Selecting (none) will prevent the user from registering with a non responsive email. Click <a href='{$smarty.const.USERS_PKG_URL}admin/verify_emails_role.php?tk={$gBitUser->mTicket}'>here</a> to validate all of your current users emails.</div> + {/forminput} + </div> + <div class="row"> + {formlabel label="Duration of 'Remember me' feature" for="users_remember_time"} + {forminput} + <select name="users_remember_time" id="users_remember_time"> + <option value="300" {if $gBitSystem->getConfig('users_remember_time') eq 300} selected="selected"{/if}>5 {tr}minutes{/tr}</option> + <option value="900" {if $gBitSystem->getConfig('users_remember_time') eq 900} selected="selected"{/if}>15 {tr}minutes{/tr}</option> + <option value="1800" {if $gBitSystem->getConfig('users_remember_time') eq 1800} selected="selected"{/if}>30 {tr}minutes{/tr}</option> + <option value="3600" {if $gBitSystem->getConfig('users_remember_time') eq 3600} selected="selected"{/if}>1 {tr}hour{/tr}</option> + <option value="7200" {if $gBitSystem->getConfig('users_remember_time') eq 7200} selected="selected"{/if}>2 {tr}hours{/tr}</option> + <option value="43200" {if $gBitSystem->getConfig('users_remember_time') eq 43200} selected="selected"{/if}>12 {tr}hours{/tr}</option> + <option value="86400" {if $gBitSystem->getConfig('users_remember_time') eq 86400} selected="selected"{/if}>1 {tr}day{/tr}</option> + <option value="604800" {if $gBitSystem->getConfig('users_remember_time') eq 604800} selected="selected"{/if}>1 {tr}week{/tr}</option> + <option value="2592000" {if $gBitSystem->getConfig('users_remember_time') eq 2592000} selected="selected"{/if}>1 {tr}month{/tr}</option> + <option value="15724800" {if $gBitSystem->getConfig('users_remember_time') eq 15724800} selected="selected"{/if}>6 {tr}months{/tr}</option> + <option value="31449600" {if $gBitSystem->getConfig('users_remember_time') eq 31449600} selected="selected"{/if}>1 {tr}year{/tr}</option> + </select> + {formhelp note=""} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Roles choice at registration" for="registration_role_choice"} + {forminput} + <select name="registration_role_choice[]" multiple="multiple" size="5"> + <option value=""> </option> + {foreach key=r item=ro from=$roleList} + {if $ro.role_id ne -1} + <option value="{$ro.role_id}" {if $ro.is_public eq 'y'} selected="selected"{/if}>{$ro.role_name|truncate:"52":" ..."}</option> + {/if} + {/foreach} + </select> + {formhelp note="A user will be able to select one of the selected roles at registration. If you select the default role (Registered), he will not be obliged to select a role."} + {/forminput} + </div> + + <div class="row submit"> + <input type="submit" name="loginprefs" value="{tr}Change preferences{/tr}" /> + </div> + {/form} + {/jstab} + + {jstab title="Registration Form"} + {form legend="Registration Form"} + <input type="hidden" name="page" value="{$page}" /> + + <p class="formhelp">{tr}Here you can specify what the registration page should look like. All these settings will still be available from the users preferences page.{/tr}</p> + + {foreach from=$registerSettings key=feature item=output} + <div class="row"> + {formlabel label=`$output.label` for=$feature} + {forminput} + {if $output.type == 'text'} + <input type="text" size="50" name="{$feature}" id="{$feature}" value="{$gBitSystem->getConfig($feature)|escape}" /> + {else} + {html_checkboxes name="$feature" values="y" checked=$gBitSystem->getConfig($feature) labels=false id=$feature} + {/if} + {formhelp note=`$output.note` page=`$output.page` link=`$output.link`} + {/forminput} + </div> + {/foreach} + + <div class="row submit"> + <input type="submit" name="registerprefs" value="{tr}Change preferences{/tr}" /> + </div> + {/form} + {/jstab} + + {jstab title="HTTP Settings"} + {form legend="HTTP Settings"} + <input type="hidden" name="page" value="{$page}" /> + + <div class="row warning">{tr}If you turn on any secure login features you must set the HTTP and HTTPS server name.{/tr}</div> + + {foreach from=$httpSettings key=feature item=output} + <div class="row"> + {formlabel label=`$output.label` for=$feature} + {forminput} + {if $output.type == 'text'} + <input type="text" size="50" name="{$feature}" id="{$feature}" value="{$gBitSystem->getConfig($feature)|escape}" /> + {else} + {html_checkboxes name="$feature" values="y" checked=$gBitSystem->getConfig($feature) labels=false id=$feature} + {/if} + {formhelp note=`$output.note` page=`$output.page` link=`$output.link`} + {/forminput} + </div> + {/foreach} + + <div class="row submit"> + <input type="submit" name="httpprefs" value="{tr}Change preferences{/tr}" /> + </div> + {/form} + {/jstab} + {foreach from=$authSettings.avail item='method' key='meth_name'} + {if count($method.options)>0} + {jstab title=$method.name} + {form legend=$method.name} + <input type="hidden" name="page" value="{$page}" /> + {foreach from=$method.options item='output' key='op_id'} + <div class="row"> + {formlabel label=$output.label for=$op_id} + {forminput} + {if $output.type == 'checkbox'} + {html_checkboxes name="$op_id" values="y" selected=$output.value labels=false id=$op_id} + {elseif $output.type == 'option'} + <select name="{$op_id}" id="{$op_id}"> + {foreach from=$output.options item='op_text' key='op_value'} + <option value="{$op_value}" {if $output.value eq $op_value} selected="selected"{/if}>{$op_text}</option> + {/foreach} + </select> + {else} + <input type="text" size="50" name="{$op_id}" id="{$op_id}" value="{$output.value|escape}" /> + {/if} + {formhelp note=`$output.note` page=`$output.page` link=`$output.link`} + {/forminput} + </div> + {/foreach} + <div class="row submit"> + <input type="submit" name="auth_{$meth_name}" value="{tr}Change {$method.name} preferences{/tr}" /> + </div> + {/form} + {/jstab} + {/if} + {/foreach} + +{/jstabs} diff --git a/templates/admin_role_permissions.tpl b/templates/admin_role_permissions.tpl index dca4a86..73b359c 100644 --- a/templates/admin_role_permissions.tpl +++ b/templates/admin_role_permissions.tpl @@ -90,7 +90,7 @@ <li><em>{$gLibertySystem->getContentTypeName($content_type_guid)}</em> <ul> {foreach from=$content item=perms key=content_id} - <li><a href="{$smarty.const.LIBERTY_PKG_URL}content_permissions.php?content_id={$content_id}">{$perms.0.title}</a> + <li><a href="{$smarty.const.LIBERTY_PKG_URL}content_role_permissions.php?content_id={$content_id}">{$perms.0.title}</a> <ul> {foreach from=$perms item=perm} <li> diff --git a/templates/admin_roles_list.tpl b/templates/admin_roles_list.tpl index be3af72..efaba22 100644 --- a/templates/admin_roles_list.tpl +++ b/templates/admin_roles_list.tpl @@ -24,7 +24,7 @@ <div class="floaticon"> {smartlink ititle="Edit" ipackage="users" ifile="admin/edit_role.php" ibiticon="icons/accessories-text-editor" role_id=$roleId} {smartlink ititle="Role Members" ipackage="users" ifile="admin/edit_role.php" ibiticon="icons/system-users" members=$roleId} - {if $roleId ne $smarty.const.ANONYMOUS_ROLE_ID} + {if $roleId ne $smarty.const.ANONYMOUS_TEAM_ID} {smartlink ititle="Batch assign" ipackage="users" ifile="admin/edit_role.php" ibiticon="icons/application-x-executable" batch_assign=$roleId} {smartlink ititle="Remove" ipackage="users" ifile="admin/edit_role.php" ibiticon="icons/edit-delete" action=delete role_id=$roleId} {/if} diff --git a/templates/center_user_wiki_page.tpl b/templates/center_user_wiki_page.tpl index 1976be2..22e53cb 100644 --- a/templates/center_user_wiki_page.tpl +++ b/templates/center_user_wiki_page.tpl @@ -13,7 +13,7 @@ {smartlink ipackage=users ifile="admin/index.php" action=delete user_id=$userInfo.user_id ititle="Remove" ibiticon="icons/edit-delete" iforce="icon"} {/if} {/if} - + <a href="" onclick="BitBase.toggleElementDisplay('userinformation','block',true);return false;">{biticon iname="contact-new" iforce="icon" ipackage="icons" iexplain="User Information"}</a> {if $gBitUser->isRegistered() && $gBitUser->mUserId eq $gQueryUser->mUserId} @@ -43,7 +43,7 @@ {include file="bitpackage:users/my_bitweaver_bar.tpl"} {/if} - <div> + <div> {if !$parsed} {if $gBitUser->mUserId ne $gQueryUser->mUserId} <p>{tr}This user has not entered any information yet.{/tr}</p> @@ -58,7 +58,7 @@ {$parsed} </div> {/if} - </div> + </div> </div> {/strip} diff --git a/templates/group_list_members.tpl b/templates/group_list_members.tpl index 2eb14d3..cd8912c 100644 --- a/templates/group_list_members.tpl +++ b/templates/group_list_members.tpl @@ -17,7 +17,7 @@ <ol class="data"> {foreach from=$groupMembers key=userId item=member} <li>{displayname hash=$member} - {if $member.user_id != $smarty.const.ANONYMOUS_USER_ID && $groupInfo.group_id != $smarty.const.ANONYMOUS_GROUP_ID} + {if $member.user_id != $smarty.const.ANONYMOUS_USER_ID && $groupInfo.group_id != $smarty.const.ANONYMOUS_TEAM_ID} <a href="{$smarty.const.USERS_PKG_URL}admin/assign_user.php?action=removegroup&group_id={$groupInfo.group_id}&assign_user={$member.user_id}">{biticon ipackage="icons" iname="edit-delete" iexplain="remove from group"}</a> {/if} </li> diff --git a/templates/menu_users_admin.tpl b/templates/menu_users_admin.tpl index 9e78e82..68a340f 100644 --- a/templates/menu_users_admin.tpl +++ b/templates/menu_users_admin.tpl @@ -10,9 +10,10 @@ <li><a class="item" href="{$smarty.const.USERS_PKG_URL}admin/users_import.php">{tr}Import Users{/tr}</a></li> {if $gBitSystem->isPackageActive('protector')} <li><a class="item" href="{$smarty.const.USERS_PKG_URL}admin/edit_role.php">{tr}Role & Permissions{/tr}</a></li> + <li><a class="item" href="{$smarty.const.USERS_PKG_URL}admin/role_permissions.php">{tr}Permission Maintenance{/tr}</a></li> {else} <li><a class="item" href="{$smarty.const.USERS_PKG_URL}admin/edit_group.php">{tr}Groups & Permissions{/tr}</a></li> + <li><a class="item" href="{$smarty.const.USERS_PKG_URL}admin/permissions.php">{tr}Permission Maintenance{/tr}</a></li> {/if} - <li><a class="item" href="{$smarty.const.USERS_PKG_URL}admin/permissions.php">{tr}Permission Maintenance{/tr}</a></li> </ul> {/strip} diff --git a/templates/my_groups_list.tpl b/templates/my_groups_list.tpl index 889d25d..7f8aca4 100644 --- a/templates/my_groups_list.tpl +++ b/templates/my_groups_list.tpl @@ -116,7 +116,7 @@ <td class="actionicon"> <a href="{$smarty.const.USERS_PKG_URL}my_groups.php?group_id={$groupId}">{biticon ipackage="icons" iname="accessories-text-editor" iexplain="edit"}</a> - {if $groupId ne -1}{* sorry for hardcoding, really need php define ANONYMOUS_GROUP_ID - spiderr *} + {if $groupId ne -1}{* sorry for hardcoding, really need php define ANONYMOUS_TEAM_ID - spiderr *} <a href="{$smarty.const.USERS_PKG_URL}my_groups.php?offset={$offset}&sort_mode={$sort_mode}&action=delete&group_id={$groupId}" onclick="return confirm('{tr}Are you sure you want to delete this group?{/tr}')">{biticon ipackage="icons" iname="edit-delete" iexplain="Delete Group"}</a> {/if} diff --git a/templates/my_roles_list.tpl b/templates/my_roles_list.tpl index 6fc495d..53e9be5 100644 --- a/templates/my_roles_list.tpl +++ b/templates/my_roles_list.tpl @@ -116,7 +116,7 @@ <td class="actionicon"> <a href="{$smarty.const.USERS_PKG_URL}my_roles.php?role_id={$roleId}">{biticon ipackage="icons" iname="accessories-text-editor" iexplain="edit"}</a> - {if $roleId ne -1}{* sorry for hardcoding, really need php define ANONYMOUS_ROLE_ID - spiderr *} + {if $roleId ne -1}{* sorry for hardcoding, really need php define ANONYMOUS_TEAM_ID - spiderr *} <a href="{$smarty.const.USERS_PKG_URL}my_roles.php?offset={$offset}&sort_mode={$sort_mode}&action=delete&role_id={$roleId}" onclick="return confirm('{tr}Are you sure you want to delete this role?{/tr}')">{biticon ipackage="icons" iname="edit-delete" iexplain="Delete Role"}</a> {/if} diff --git a/templates/role_list_members.tpl b/templates/role_list_members.tpl index c6c4219..c4673e9 100644 --- a/templates/role_list_members.tpl +++ b/templates/role_list_members.tpl @@ -17,7 +17,7 @@ <ol class="data"> {foreach from=$roleMembers key=userId item=member} <li>{displayname hash=$member} - {if $member.user_id != $smarty.const.ANONYMOUS_USER_ID && $roleInfo.role_id != $smarty.const.ANONYMOUS_ROLE_ID} + {if $member.user_id != $smarty.const.ANONYMOUS_USER_ID && $roleInfo.role_id != $smarty.const.ANONYMOUS_TEAM_ID} <a href="{$smarty.const.USERS_PKG_URL}admin/assign_user.php?action=removerole&role_id={$roleInfo.role_id}&assign_user={$member.user_id}">{biticon ipackage="icons" iname="edit-delete" iexplain="remove from role"}</a> {/if} </li> diff --git a/templates/users_admin.tpl b/templates/users_admin.tpl index ff894b5..60c9023 100644 --- a/templates/users_admin.tpl +++ b/templates/users_admin.tpl @@ -112,9 +112,9 @@ <div class="row submit"> {if $gBitSystem->isPackageActive('protector')} - <input type="submit" name="newuser" value="{tr}Add User{/tr}"{if $defaultGroupId eq ''} disabled="disabled"{/if} /> - {else} <input type="submit" name="newuser" value="{tr}Add User{/tr}"{if $defaultRoleId eq ''} disabled="disabled"{/if} /> + {else} + <input type="submit" name="newuser" value="{tr}Add User{/tr}"{if $defaultGroupId eq ''} disabled="disabled"{/if} /> {/if} </div> {/form} diff --git a/templates/users_list.tpl b/templates/users_list.tpl index 5e51d6f..124779a 100644 --- a/templates/users_list.tpl +++ b/templates/users_list.tpl @@ -28,7 +28,7 @@ {smartlink ipackage=users ifile="admin/index.php" assume_user=$users[user].user_id ititle="Assume User Identity" ibiticon="users/assume_user" iforce=icon} {smartlink ipackage=users ifile="preferences.php" view_user=$users[user].user_id ititle="Edit User Information" ibiticon="icons/accessories-text-editor" iforce=icon} {if $gBitSystem->isPackageActive('protector')} - {smartlink ipackage=users ifile="admin/assign_user.php" assign_user=$users[user].user_id ititle="Assign Group" ibiticon="icons/emblem-shared" iforce=icon} + {smartlink ipackage=users ifile="admin/assign_role_user.php" assign_user=$users[user].user_id ititle="Assign Group" ibiticon="icons/emblem-shared" iforce=icon} {else} {smartlink ipackage=users ifile="admin/assign_user.php" assign_user=$users[user].user_id ititle="Assign Role" ibiticon="icons/emblem-shared" iforce=icon} {/if} @@ -19,7 +19,6 @@ $gEditMode = 'theme'; * required setup */ include_once( '../kernel/setup_inc.php' ); -include_once( USERS_PKG_PATH.'BitUser.php' ); include_once( THEMES_PKG_PATH.'css_lib.php' ); include_once( KERNEL_PKG_PATH.'BitSystem.php' ); |
