Ignore:
Timestamp:
Dec 19, 2010, 9:16:30 PM (13 years ago)
Author:
Eric
Message:

bug 2069 : First step to heaven ! ;-) Thanks to Luc who drives me to the solution. This is not fully functional and some tests are still under progress.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/LCAS/trunk/include/functions.inc.php

    r8180 r8197  
    851851}
    852852
     853/**
     854 * Function called from main.inc.php - Returns exiting lowercase username in database
     855 *
     856 * @param : $username typed in by user for identification
     857 *
     858 * @return : lowercase $username found in database
     859 *
     860 */
     861function LCAS_SearchUsername($username)
     862{
     863  global $conf;
     864 
     865  if (isset($username))
     866  {
     867    $query = "
     868SELECT ".$conf['user_fields']['username']."
     869FROM ".USERS_TABLE."
     870WHERE LOWER(".$conf['user_fields']['username'].") = '".strtolower($username)."'
     871LIMIT 1;";
     872
     873    list($username) = pwg_db_fetch_assoc(pwg_query($query));;
     874
     875    return isset($username) ? $username : '';
     876  }
     877}
     878
    853879
    854880// DebugLog function
Note: See TracChangeset for help on using the changeset viewer.