#!/usr/bin/env bash set -a source /usr/share/yunohost/helpers app=$1 new_users=$2 if [[ "${0//.\/50-}" = "$app" ]]; then install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) for user in $(echo "$new_users" | sed "s/,/ /g") do user_token=$(ynh_string_random) sudo -u $app $install_dir/cli/create-user.php --user $user --language en --token $user_token done fi