summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2008-10-16 10:22:41 +0000
committerMax Kremmel <xing@synapse.plus.com>2008-10-16 10:22:41 +0000
commite5be71aed8f5b77f67ed279316245d4eaacd207b (patch)
treec1eeeb935d838b1c4109c9534ba997d8d3952218
parentdc54458db549e6809004e9e0d16527919b87df66 (diff)
downloadusers-e5be71aed8f5b77f67ed279316245d4eaacd207b.tar.gz
users-e5be71aed8f5b77f67ed279316245d4eaacd207b.tar.bz2
users-e5be71aed8f5b77f67ed279316245d4eaacd207b.zip
make sure users_lib.php is always loaded
-rw-r--r--BitUser.php24
-rw-r--r--admin/index.php5
-rw-r--r--admin/users_import.php6
3 files changed, 17 insertions, 18 deletions
diff --git a/BitUser.php b/BitUser.php
index d33a91b..5bd8498 100644
--- a/BitUser.php
+++ b/BitUser.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.195 2008/10/16 10:18:26 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.196 2008/10/16 10:22:41 squareing Exp $
*
* Lib for user administration, groups and permissions
* This lib uses pear so the constructor requieres
@@ -12,7 +12,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: BitUser.php,v 1.195 2008/10/16 10:18:26 squareing Exp $
+ * $Id: BitUser.php,v 1.196 2008/10/16 10:22:41 squareing Exp $
* @package users
*/
@@ -20,27 +20,29 @@
* required setup
*/
require_once( LIBERTY_PKG_PATH.'LibertyMime.php' );
+require_once( USERS_PKG_PATH.'users_lib.php' );
+
define( 'AVATAR_TYPE_CENTRALIZED', 'c' );
define( 'AVATAR_TYPE_USER_DB', 'u' );
define( 'AVATAR_TYPE_LIBRARY', 'l' );
// Column sizes for users_users table
-define('REAL_NAME_COL_SIZE', 64);
+define( 'REAL_NAME_COL_SIZE', 64 );
-define('BITUSER_CONTENT_TYPE_GUID', 'bituser' );
+define( 'BITUSER_CONTENT_TYPE_GUID', 'bituser' );
-// some definitions for helping with authentication
-define("USER_VALID", 2);
-define("SERVER_ERROR", -1);
-define("PASSWORD_INCORRECT", -3);
-define("USER_NOT_FOUND", -5);
-define("ACCOUNT_DISABLED", -6);
+// some definitions for helping with authentication
+define( "USER_VALID", 2 );
+define( "SERVER_ERROR", -1 );
+define( "PASSWORD_INCORRECT", -3 );
+define( "USER_NOT_FOUND", -5 );
+define( "ACCOUNT_DISABLED", -6 );
/**
* Class that holds all information for a given user
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.195 $
+ * @version $Revision: 1.196 $
* @package users
* @subpackage BitUser
*/
diff --git a/admin/index.php b/admin/index.php
index d3e726e..97d6d1f 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -1,5 +1,5 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_users/admin/index.php,v 1.28 2008/10/15 16:27:20 wjames5 Exp $
+// $Header: /cvsroot/bitweaver/_bit_users/admin/index.php,v 1.29 2008/10/16 10:22:41 squareing Exp $
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// 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.
@@ -13,10 +13,9 @@ $gBitSystem->verifyPermission( 'p_users_admin' );
$feedback = array();
if( isset($_REQUEST["newuser"] ) ) {
- require_once( USERS_PKG_PATH.'users_lib.php' );
$userRecord = $_REQUEST;
$newUser = new BitPermUser();
-
+
if( $newUser->importUser( $userRecord ) ) {
$gBitSmarty->assign( 'addSuccess', "User Added Successfully" );
if( empty( $_REQUEST['admin_noemail_user'] ) ) {
diff --git a/admin/users_import.php b/admin/users_import.php
index 54f3e19..ee1ce21 100644
--- a/admin/users_import.php
+++ b/admin/users_import.php
@@ -1,5 +1,5 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_users/admin/users_import.php,v 1.3 2008/06/25 22:21:28 spiderr Exp $
+// $Header: /cvsroot/bitweaver/_bit_users/admin/users_import.php,v 1.4 2008/10/16 10:22:41 squareing Exp $
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// 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.
@@ -11,10 +11,8 @@ $gBitSystem->verifyPermission( 'p_users_admin' );
$feedback = array();
if( isset( $_REQUEST["batchimport"])) {
- require_once( USERS_PKG_PATH.'users_lib.php' );
// check if it's a batch upload
-
- if( $_FILES['csvlist']['size'] && is_uploaded_file($_FILES['csvlist']['tmp_name'] ) ) {
+ if( $_FILES['csvlist']['size'] && is_uploaded_file( $_FILES['csvlist']['tmp_name'] ) ) {
global $gBitSmarty, $gBitUser, $gBitSystem;
// get the delimiter if it's set - use comma if it not