summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2007-01-06 09:46:27 +0000
committerMax Kremmel <xing@synapse.plus.com>2007-01-06 09:46:27 +0000
commitfca48784813dc2013af068ad0e929ed132c10017 (patch)
tree084f6544eec72ea0d8afce1b3ed079565f9f3909
parent97d15661ed8c12f217d515f7ab666e19efc75354 (diff)
downloadusers-fca48784813dc2013af068ad0e929ed132c10017.tar.gz
users-fca48784813dc2013af068ad0e929ed132c10017.tar.bz2
users-fca48784813dc2013af068ad0e929ed132c10017.zip
rename some methods in BitDbBase to meet bitweaver standards. all changes backwards compatible with deprecated function call message.
-rw-r--r--BitPermUser.php10
-rw-r--r--BitUser.php14
-rw-r--r--auth/bit/auth.php8
3 files changed, 16 insertions, 16 deletions
diff --git a/BitPermUser.php b/BitPermUser.php
index bf4cbb8..a636bdd 100644
--- a/BitPermUser.php
+++ b/BitPermUser.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/BitPermUser.php,v 1.49 2006/12/29 12:40:38 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/BitPermUser.php,v 1.50 2007/01/06 09:46:27 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: BitPermUser.php,v 1.49 2006/12/29 12:40:38 squareing Exp $
+ * $Id: BitPermUser.php,v 1.50 2007/01/06 09:46:27 squareing Exp $
* @package users
*/
@@ -25,7 +25,7 @@ require_once( dirname( __FILE__ ).'/BitUser.php' );
* Class that holds all information for a given user
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.49 $
+ * @version $Revision: 1.50 $
* @package users
* @subpackage BitPermUser
*/
@@ -207,7 +207,7 @@ class BitPermUser extends BitUser {
}
$this->prepGetList( $pListHash );
- $sortMode = $this->mDb->convert_sortmode( $pListHash['sort_mode'] );
+ $sortMode = $this->mDb->convertSortmode( $pListHash['sort_mode'] );
if( !empty( $pListHash['find_groups'] ) ) {
$mid = " WHERE UPPER(`group_name`) like ?";
$bindvars[] = "%".strtoupper( $pListHash['find_groups'] )."%";
@@ -647,7 +647,7 @@ class BitPermUser extends BitUser {
$mid = $selectSql = $fromSql = '';
if( !empty( $pSortMode ) ) {
- $sortMode = $this->mDb->convert_sortmode( $pSortMode );
+ $sortMode = $this->mDb->convertSortmode( $pSortMode );
} else {
$sortMode = 'up.`package`, up.`perm_name` ASC';
}
diff --git a/BitUser.php b/BitUser.php
index 74834bb..5fab1a0 100644
--- a/BitUser.php
+++ b/BitUser.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.120 2007/01/06 06:23:11 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.121 2007/01/06 09:46:27 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.120 2007/01/06 06:23:11 spiderr Exp $
+ * $Id: BitUser.php,v 1.121 2007/01/06 09:46:27 squareing Exp $
* @package users
*/
@@ -40,7 +40,7 @@ define("ACCOUNT_DISABLED", -6);
* Class that holds all information for a given user
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.120 $
+ * @version $Revision: 1.121 $
* @package users
* @subpackage BitUser
*/
@@ -904,7 +904,7 @@ class BitUser extends LibertyAttachable {
$mid = '';
$bindvars=array();
}
- $query = "select `login` from `".BIT_DB_PREFIX."users_users` $mid order by ".$this->mDb->convert_sortmode($sort_mode);
+ $query = "select `login` from `".BIT_DB_PREFIX."users_users` $mid order by ".$this->mDb->convertSortmode($sort_mode);
$result = $this->mDb->query($query,$bindvars,$max_records,$offset);
$ret = array();
while ($res = $result->fetchRow()) {
@@ -1045,7 +1045,7 @@ class BitUser extends LibertyAttachable {
}
function get_users($offset = 0, $max_records = -1, $sort_mode = 'login_desc', $find = '') {
- $sort_mode = $this->mDb->convert_sortmode($sort_mode);
+ $sort_mode = $this->mDb->convertSortmode($sort_mode);
// Return an array of users indicating name, email, last changed pages, versions, last_login
if ($find) {
$findesc = '%' . strtoupper( $find ) . '%';
@@ -1098,7 +1098,7 @@ class BitUser extends LibertyAttachable {
$query = "select DISTINCT uc.`user_id`, `login`, `real_name` ,`connect_time`, `ip`, `user_agent`, `last_get`
FROM `".BIT_DB_PREFIX."users_cnxn` uc INNER JOIN `".BIT_DB_PREFIX."users_users` uu ON (uc.`user_id`=uu.`user_id`)
WHERE uc.`user_id` IS NOT NULL $whereSql
- ORDER BY ".$this->mDb->convert_sortmode( $pListHash['sort_mode'] );
+ ORDER BY ".$this->mDb->convertSortmode( $pListHash['sort_mode'] );
$result = $this->mDb->query($query, $bindVars, $pListHash['max_records'], $pListHash['offset'] );
$ret = array();
while ($res = $result->fetchRow()) {
@@ -1518,7 +1518,7 @@ class BitUser extends LibertyAttachable {
if ( !isset( $pParamHash['sort_mode']) or $pParamHash['sort_mode'] == '' ) $pParamHash['sort_mode'] = 'registration_date_desc';
LibertyContent::prepGetList( $pParamHash );
- $sort_mode = $this->mDb->convert_sortmode($pParamHash['sort_mode']);
+ $sort_mode = $this->mDb->convertSortmode($pParamHash['sort_mode']);
// Return an array of users indicating name, email, last changed pages, versions, last_login
if ( $pParamHash['find'] ) {
$mid = " where UPPER(uu.`login`) LIKE ? OR UPPER(uu.real_name) LIKE ? OR UPPER(uu.email) LIKE ? ";
diff --git a/auth/bit/auth.php b/auth/bit/auth.php
index c105482..ef68593 100644
--- a/auth/bit/auth.php
+++ b/auth/bit/auth.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/auth/bit/auth.php,v 1.4 2006/10/13 12:47:40 lsces Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/auth/bit/auth.php,v 1.5 2007/01/06 09:46:27 squareing Exp $
*
* @package users
*/
@@ -30,7 +30,7 @@ class BitAuth extends BaseAuth {
$loginVal = strtoupper( $user ); // case insensitive login
$loginCol = ' UPPER(`'.(strpos( $user, '@' ) ? 'email' : 'login').'`)';
// first verify that the user exists
- $query = "select `email`, `login`, `user_id`, `user_password` from `".BIT_DB_PREFIX."users_users` where " . $gBitDb->convert_binary(). " $loginCol = ?";
+ $query = "select `email`, `login`, `user_id`, `user_password` from `".BIT_DB_PREFIX."users_users` where " . $gBitDb->convertBinary(). " $loginCol = ?";
$result = $gBitDb->query( $query, array( $loginVal ) );
if( !$result->numRows() ) {
$this->mErrors['login'] = 'User not found';
@@ -44,7 +44,7 @@ class BitAuth extends BaseAuth {
// next verify the password with 2 hashes methods, the old one (pass)) and the new one (login.pass;email)
// TODO - this needs cleaning up - wolff_borg
if( !$gBitSystem->isFeatureActive( 'feature_challenge' ) || empty($response) ) {
- $query = "select `user_id`, `hash` from `".BIT_DB_PREFIX."users_users` where " . $gBitDb->convert_binary(). " $loginCol = ? and (`hash`=? or `hash`=?)";
+ $query = "select `user_id`, `hash` from `".BIT_DB_PREFIX."users_users` where " . $gBitDb->convertBinary(). " $loginCol = ? and (`hash`=? or `hash`=?)";
if ( $row = $gBitDb->getRow( $query, array( $loginVal, $hash, $hash2 ) ) ) {
// auto-update old hashes with simple and standard md5( password )
$hashUpdate = '';
@@ -64,7 +64,7 @@ class BitAuth extends BaseAuth {
} else {
// Use challenge-reponse method
// Compare pass against md5(user,challenge,hash)
- $hash = $gBitDb->getOne("select `hash` from `".BIT_DB_PREFIX."users_users` where " . $gBitDb->convert_binary(). " $loginCol = ?", array( $user ) );
+ $hash = $gBitDb->getOne("select `hash` from `".BIT_DB_PREFIX."users_users` where " . $gBitDb->convertBinary(). " $loginCol = ?", array( $user ) );
if (!isset($_SESSION["challenge"])) {
$this->mErrors[] = 'Invalid challenge';
$ret=PASSWORD_INCORRECT;