Trying to confirm account while being signed in results in crash
Describe the bug
Trying to confirm another account while being signed in results in crash.
Steps to reproduce
- Sign in as account A
- Add account B
- Click confirmation link in the e-mail of account B, while still being signed in as A
Expected behavior
Human-friendly warning that you need to sign out prior to confirmation or automatic account switch to account B.
Actual behavior
Error shows up.
Relevant logs and/or screenshots
CodeIgniter\Shield\Exceptions\LogicException
The user has User Info in Session, so already logged in or in pending login state. If a logged in user logs in again with other account, the session data of the previous user will be used as the new user. Fix your code to prevent users from logging in without logging out or delete the session data. user_id: 1
at /home/app/vendor/codeigniter4/shield/src/Authentication/Authenticators/Session.php:609
Context
- Castopod: 1.1.2
- OS: ubuntu / OVH shared hosting
- Browser: safari
- Web server: apache