* @return \wcf\data\user\User
*/
public static function getUserByUsername($username) {
- $sql = "SELECT *
- FROM wcf".WCF_N."_user
- WHERE username = ?";
+ $sql = "SELECT user_option_value.*, user_table.*
+ FROM wcf".WCF_N."_user user_table
+ LEFT JOIN wcf".WCF_N."_user_option_value user_option_value
+ ON (user_option_value.userID = user_table.userID)
+ WHERE user_table.username = ?";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute(array($username));
$row = $statement->fetchArray();
* @return \wcf\data\user\User
*/
public static function getUserByEmail($email) {
- $sql = "SELECT *
- FROM wcf".WCF_N."_user
- WHERE email = ?";
+ $sql = "SELECT user_option_value.*, user_table.*
+ FROM wcf".WCF_N."_user user_table
+ LEFT JOIN wcf".WCF_N."_user_option_value user_option_value
+ ON (user_option_value.userID = user_table.userID)
+ WHERE user_table.email = ?";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute(array($email));
$row = $statement->fetchArray();