Repository navigation
New accounts default to text when a phone number is on file (v1.16.0) - #107
Merged
Merged
Conversation
A sign-up that gave both an email address and a phone number used to start on Email; it now starts on SMS (WhatsApp when that was the choice at sign-up), and only an account with no phone starts on Email. The rule applies at register_user(), the walk-in page, the API's user create (a sent preferred_contact still wins), the admin CSV import and the admin Add User form. Also: delete_league_cascade() removes the league's API keys and their request log first, so a league holding a key can be deleted and its last member's account deletion no longer dies on the foreign key. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New accounts default to text when a phone number is on file. A sign-up that gave both an email address and a phone number used to start on Email; it now starts on SMS (WhatsApp when that was the choice at sign-up), and only an account with no phone starts on Email. The rule applies everywhere an account is made: the sign-up page, the walk-in door page, the API's user create (a
preferred_contactthe caller sends still wins), the admin CSV import (when thepreferred_contactcolumn is blank) and the admin Add User form. Existing accounts are untouched, and everyone can still change the choice under Settings. (register_user()inwww/auth.php,www/walkin.php,www/api/v1/users.php,www/admin_settings.php.)A league holding an API key can be deleted. Deleting such a league answered "Delete failed: FOREIGN KEY constraint failed", and the same failure stopped the account deletion of its last member, whose league is removed with them.
delete_league_cascade()inwww/db.phpnow removes the league's keys and their request log first.Verified on dev: the new
signup_default_sms_check.js21/21 (every creation path plus the cascade), walkin 9, walkin_guard 21, account_guard 36, low_hardening 44, invite_identity 31, the generated-JavaScript sweep 37 pages clean, the five greps empty.🤖 Generated with Claude Code