mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
Merge pull request #3553 from alchemy-fr/PHRAS-3150-Make-optional-for-sync-admin-password
PHRAS-3150 merge Make the synchronization of the password of the Phraseanet root account optional
This commit is contained in:
2
.env
2
.env
@@ -39,6 +39,8 @@ PHP_LOG_LEVEL=warning
|
||||
# These variables are used in the configuration.yml .
|
||||
|
||||
# set here the first user / email couple
|
||||
#set to id of Phraseanet root account, if you want activate a sync for Phraseanet root account password provide by PHRASEANET_ADMIN_ACCOUNT_PASSWORD env value.
|
||||
PHRASEANET_ADMIN_ACCOUNT_ID=
|
||||
PHRASEANET_ADMIN_ACCOUNT_EMAIL=admin@alchemy.fr
|
||||
PHRASEANET_ADMIN_ACCOUNT_PASSWORD=iJRqXU0MwbyJewQLBbra6IWHsWly
|
||||
# Database parameters
|
||||
|
@@ -46,6 +46,7 @@ services:
|
||||
- OPCACHE_ENABLED
|
||||
- SESSION_CACHE_LIMITER
|
||||
- PHP_LOG_LEVEL
|
||||
- PHRASEANET_ADMIN_ACCOUNT_ID
|
||||
- PHRASEANET_ADMIN_ACCOUNT_EMAIL
|
||||
- PHRASEANET_ADMIN_ACCOUNT_PASSWORD
|
||||
- PHRASEANET_DB_HOST
|
||||
|
@@ -32,8 +32,8 @@ if [ -f "$FILE" ]; then
|
||||
bin/setup system:config set registry.email.emitter-email $PHRASEANET_EMITTER_EMAIL
|
||||
bin/setup system:config set registry.email.prefix $PHRASEANET_MAIL_OBJECT_PREFIX
|
||||
fi
|
||||
if [[ $PHRASEANET_ADMIN_ACCOUNT_PASSWORD ]]; then
|
||||
bin/console user:password --user_id=1 --password $PHRASEANET_ADMIN_ACCOUNT_PASSWORD -y
|
||||
if [[ -n ${PHRASEANET_ADMIN_ACCOUNT_ID} && $PHRASEANET_ADMIN_ACCOUNT_ID =~ ^[0-9]+$ ]]; then
|
||||
bin/console user:password --user_id=$PHRASEANET_ADMIN_ACCOUNT_ID --password $PHRASEANET_ADMIN_ACCOUNT_PASSWORD -y
|
||||
fi
|
||||
|
||||
else
|
||||
|
Reference in New Issue
Block a user