Переглянути джерело

Update admin_email on domain change

Girish Ramakrishnan 7 роки тому
батько
коміт
e0ee664e0a
1 змінених файлів з 6 додано та 0 видалено
  1. 6 0
      start.sh

+ 6 - 0
start.sh

@@ -100,6 +100,12 @@ echo "Updating domain related settings"
 $WP option update siteurl "${APP_ORIGIN}"
 $WP option update home "${APP_ORIGIN}"
 
+# If the user has not changed the email, update it to reflect it any domain change
+if [[ "$($WP option get admin_email)" == *.app@* ]]; then
+    echo "Updating admin email since it was unchanged"
+    $WP option update admin_email "${MAIL_FROM}"
+fi
+
 # configure WP mail smtp plugin (smtp_user, smtp_pass can be set when supported)
 echo "Configuring smtp mail"
 $WP option update mailer smtp