1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dolibarr_ynh.git synced 2024-09-03 18:35:53 +02:00
dolibarr_ynh/hooks/post_user_create

22 lines
1.1 KiB
Text
Raw Permalink Normal View History

#!/bin/bash
app="$(basename $0 | cut -d- -f 2-)" # Extract the app name from the script name, which is supposed to be something like "50-app_id"
2023-11-27 15:31:28 +01:00
src_path=$(yunohost app setting $app install_dir)
2022-12-07 17:59:08 +01:00
# member=__MEMBER__
# Sync users
if sudo php "$src_path/scripts/user/sync_users_ldap2dolibarr.php" commitiferror --server=localhost -y; then
echo ldap user update ok
else
echo ldap user update ended with error
fi
# If YNH users should also be members, sync members
2022-12-07 17:59:08 +01:00
# if [ $member -eq 1 ];
# then
# if sudo php "$src_path/scripts/members/sync_members_ldap2dolibarr.php" commitiferror 1 --server=localhost -y; then
2022-12-07 17:59:08 +01:00
# echo ldap member update ok
# else
# echo ldap member update ended with error
# fi
# fi