summaryrefslogtreecommitdiffstats
path: root/web/lib/acctfuncs.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'web/lib/acctfuncs.inc.php')
-rw-r--r--web/lib/acctfuncs.inc.php27
1 files changed, 1 insertions, 26 deletions
diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php
index f718a773..ee8f0e3f 100644
--- a/web/lib/acctfuncs.inc.php
+++ b/web/lib/acctfuncs.inc.php
@@ -479,7 +479,7 @@ function try_login() {
}
$dbh = DB::connect();
- $userID = valid_user($_REQUEST['user']);
+ $userID = uid_from_username($_REQUEST['user']);
if (user_suspended($userID)) {
$login_error = __('Account suspended');
@@ -609,31 +609,6 @@ function valid_username($user) {
}
/**
- * Determine if a username exists in the database
- *
- * @param string $user Username to check in the database
- *
- * @return string|void Return user ID if in database, otherwise void
- */
-function valid_user($user) {
- if (!$user) {
- return false;
- }
-
- $dbh = DB::connect();
-
- $q = "SELECT ID FROM Users WHERE ";
- $q.= "Username = " . $dbh->quote($user);
- $result = $dbh->query($q);
- if (!$result) {
- return null;
- }
-
- $row = $result->fetch(PDO::FETCH_NUM);
- return $row[0];
-}
-
-/**
* Determine if a user already has a proposal open about themselves
*
* @param string $user Username to checkout for open proposal