Admin-set additional emails are never auto-verified
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
Describe the bug
Two distinct bugs in UsersController.php prevent additional emails set by an admin via the Provisioning API from being automatically verified.
Technical Details
This isn't an area of code I'm too familiar with; I don't have time to address this fully at the moment, so I'm leaving the details here:
editUserMultiValue()line 859:getPropertyByValue($key)incorrectly looks up the old email (just removed) instead of the new$value. This always returnsnull, causing the code to skipsetLocallyVerified(VERIFIED).editUser()lines 1130–1145: TheCOLLECTION_EMAILcase contains no auto-verify logic at all.
The $key / $value variable naming is somewhat confusing in this area of code, so these logic gaps weren't immediately obvious.
Impact
Admin-provisioned additional emails remain in a "not confirmed" state, which:
- Blocks them from being set as the primary email.
- Prevents their use for password resets and system notifications.
- Triggers unnecessary verification emails to the end user.
Expected behavior
Additional emails set by an administrator via the API should be marked as verified automatically.
Additional context
These bugs have likely gone unnoticed because the standard Admin UI does not expose additional email management for other users; the issue is currently limited to direct callers of the Provisioning API.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in UsersController.php at editUserMultiValue() around line 859 and editUser() around lines 1130–1145. Trace how the Provisioning API updates additional emails and how local verification is assigned, paying attention to the $key/$value roles. Done means administrator-set additional emails are automatically marked verified in both code paths and existing behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100