def delete_user_line_extension_with_user_id(user_id):
    user = user_helper.get_by_user_id(user_id)
    if not user:
        return

    line_id = user_helper.find_line_id_for_user(user_id)
    if line_id:
        line_helper.delete_line(line_id)

    extension_id = extension_helper.find_extension_id_for_line(line_id)
    if extension_id:
        extension_helper.delete(extension_id)

    user_helper.delete_user(user.id)
예제 #2
0
def delete_user_line_extension_with_user_id(user_id):
    user = user_helper.get_by_user_id(user_id)
    if not user:
        return

    line_id = user_helper.find_line_id_for_user(user_id)
    if line_id:
        line_helper.delete_line(line_id)

    extension_id = extension_helper.find_extension_id_for_line(line_id)
    if extension_id:
        extension_helper.delete(extension_id)

    user_helper.delete_user(user.id)
예제 #3
0
def _find_user_name_for_func_key(func_key):
    user = user_helper.get_by_user_id(func_key['destination_id'])
    return "%s %s" % (user.firstname, user.lastname)
예제 #4
0
def _find_user_name_for_func_key(func_key):
    user = user_helper.get_by_user_id(func_key['destination_id'])
    return "%s %s" % (user.firstname, user.lastname)