fix user sync issue after setup finishes

This commit is contained in:
Jason Ertel
2023-03-08 15:10:31 -05:00
parent 0f456e6ecd
commit b9e3024521
2 changed files with 0 additions and 20 deletions

View File

@@ -496,19 +496,6 @@ EOF
fi
}
function migrateLockedUsers() {
# This is a migration function to convert locked users from prior to 2.3.90
# to inactive users using the newer Kratos functionality. This should only
# find locked users once.
lockedEmails=$(curl -s ${kratosUrl}/identities | jq -r '.[] | select(.traits.status == "locked") | .traits.email')
if [[ -n "$lockedEmails" ]]; then
echo "Disabling locked users..."
for email in $lockedEmails; do
updateStatus "$email" locked
done
fi
}
function updateStatus() {
email=$1
status=$2
@@ -703,11 +690,6 @@ case "${operation}" in
echo "Password is acceptable"
;;
"migrate")
migrateLockedUsers
echo "User migration complete"
;;
*)
fail "Unsupported operation: $operation"
usage