summaryrefslogtreecommitdiff
path: root/auth/bit/auth.php
diff options
context:
space:
mode:
Diffstat (limited to 'auth/bit/auth.php')
-rwxr-xr-xauth/bit/auth.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/auth/bit/auth.php b/auth/bit/auth.php
index 17e118e..4b195c2 100755
--- a/auth/bit/auth.php
+++ b/auth/bit/auth.php
@@ -34,7 +34,7 @@ class BitAuth extends BaseAuth {
$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->convertBinary(). " $loginCol = ?";
- $result = $gBitDb->query( $query, array( $loginVal ) );
+ $result = $gBitDb->query( $query, [ $loginVal ] );
if( !$result->numRows() ) {
$this->mErrors['login'] = 'User not found';
} else {
@@ -48,7 +48,7 @@ class BitAuth extends BaseAuth {
// 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->convertBinary(). " $loginCol = ? and (`hash`=? or `hash`=?)";
- if ( $row = $gBitDb->getRow( $query, array( $loginVal, $hash, $hash2 ) ) ) {
+ if ( $row = $gBitDb->getRow( $query, [ $loginVal, $hash, $hash2 ] ) ) {
// auto-update old hashes with simple and standard md5( password )
$hashUpdate = '';
if( $row['hash'] == $hash ) {
@@ -67,7 +67,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->convertBinary(). " $loginCol = ?", array( $user ) );
+ $hash = $gBitDb->getOne("select `hash` from `".BIT_DB_PREFIX."users_users` where " . $gBitDb->convertBinary(). " $loginCol = ?", [ $user ] );
if (!isset($_SESSION["challenge"])) {
$this->mErrors[] = 'Invalid challenge';
$ret=PASSWORD_INCORRECT;