def METHOD_NAME(self, user):
    # The user object we got from 'requires_login' is not fully hydrated yet. Look up the database user.
    user = self.db.user_by_username(user["username"])
    output = {"username": user["username"], "email": user["email"], "language": user.get("language", "en")}
    for field in ["birth_year", "country", "gender", "prog_experience", "experience_languages", "third_party"]:
        if field in user:
            output[field] = user[field]
    if "verification_pending" in user:
        output["verification_pending"] = True
    output["student_classes"] = self.db.get_student_classes(user["username"])
    output["session_expires_at"] = timems() + SESSION_LENGTH * 1000
    return jsonify(output), 200