Fix sms_abo memberid

This commit is contained in:
poka 2019-12-18 16:35:29 +01:00
parent eb08ec5f11
commit a54df36c2f
1 changed files with 5 additions and 9 deletions

View File

@ -19,18 +19,14 @@ sms_INIT_ACCOUNT "$PHONE"
case "$SERVICE" in
ON)
log "Abonnement Kalkun"
if [[ "$MEMBER" != "" ]]; then
add_contact $PHONE $MEMBERUID && log "${c_green}Contact has been added to database$c_" || log "${c_red}Contact can't be added to database$c_";
sms_SEND "$PHONE" "$MEMBER votre inscription annuaire est active"
fi
log "Abonnement Kalkun"
add_contact $PHONE $MEMBER && log "${c_green}Contact has been added to database$c_" || log "${c_red}Contact can't be added to database$c_";
sms_SEND "$PHONE" "$MEMBER votre inscription annuaire est active"
;;
OFF)
log "Retrait Kalkun"
if [[ $MEMBER ]]; then
rm_contact $PHONE $MEMBERUID && log "${c_green}Contact has been deleted from database$c_" || log "${c_red}Contact can't be deleted database$c_";
sms_SEND "$PHONE" "$MEMBER retrait annuaire prise en compte..."
fi
rm_contact $PHONE $MEMBER && log "${c_green}Contact has been deleted from database$c_" || log "${c_red}Contact can't be deleted database$c_";
sms_SEND "$PHONE" "$MEMBER retrait annuaire prise en compte..."
;;
MARCHE)