logout after password change

This commit is contained in:
Shihaam Abdul Rahman 2021-05-08 19:29:58 +05:00
parent fad3a80d5b
commit 7a08cec336

View File

@ -55,7 +55,6 @@ else
: :
fi fi
if [ "$OTPCHANNEL" = "mobile" ] if [ "$OTPCHANNEL" = "mobile" ]
then then
ECHOOTPCHANNEL=$PHONE ECHOOTPCHANNEL=$PHONE
@ -77,13 +76,15 @@ PASSCHANGED=$(curl -s -b $COOKIE $BML_URL/user/changepassword \
--compressed \ --compressed \
| jq -r .success) | jq -r .success)
OLD_PASSWORD=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 5)
NEW_PASSWORD=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 5)
REPEAT_NEWPASSWORD=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 5)
if [ "$PASSCHANGED" != "true" ] if [ "$PASSCHANGED" != "true" ]
then then
echo "${red}Failed to change password${reset}" echo "${red}Failed to change password${reset}"
else else
echo "${lightgreen}Password changed succesfully ${reset}" echo "${lightgreen}Password changed succesfully ${reset}"
OLD_PASSWORD=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 5) rm $CREDENTIALS
NEW_PASSWORD=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 5) source readpass.sh
REPEAT_NEWPASSWORD=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 5)
source settings-menu.sh
fi fi