def get_local_username(pamh):
    """
    Returns the local user name wanting to authenticate
    :param pamh: PAM handle from python_pam module
    :return: local username or empty string if not found
    """
    try:
        user = pamh.get_user(None)
    except:
        user = ''

    return user