(username)
return user._id
Takes a username and returns the couch user id for that user

    :param username: The username name of a user

    :returns: The couch user id
Takes a username and returns the couch user id for that user
Takes a username and returns the couch user id for that user
def username_to_user_id(username):
    '''
    Takes a username and returns the couch user id for that user

    :param username: The username name of a user

    :returns: The couch user id
    '''
    from corehq.apps.users.models import CouchUser

    user = CouchUser.get_by_username(username)
    if not user:
        return None

    return user._id
def username_to_user_id ( username ) : from corehq . apps . users . models import CouchUser user = CouchUser . get_by_username ( username ) if not user : return None return user . _id