Fixed null reference error in user.php