mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-03 16:10:31 +00:00
dev: add user.email-changed event
Docker Image CI / build-and-push-image (push) Waiting to run
Maintain Release Merge PR / update-release-pr (push) Waiting to run
release-please / release-please (push) Waiting to run
test / test (18.x) (push) Waiting to run
test / test (20.x) (push) Waiting to run
test / test (22.x) (push) Waiting to run
Docker Image CI / build-and-push-image (push) Waiting to run
Maintain Release Merge PR / update-release-pr (push) Waiting to run
release-please / release-please (push) Waiting to run
test / test (18.x) (push) Waiting to run
test / test (20.x) (push) Waiting to run
test / test (22.x) (push) Waiting to run
This commit is contained in:
@@ -75,6 +75,12 @@ const CHANGE_EMAIL_CONFIRM = eggspress('/change_email/confirm', {
|
||||
'UPDATE `user` SET `email` = ?, `clean_email` = ?, `unconfirmed_change_email` = NULL, `change_email_confirm_token` = NULL, `pass_recovery_token` = NULL WHERE `id` = ?',
|
||||
[new_email, clean_email, user_id]
|
||||
);
|
||||
|
||||
const svc_event = req.services.get('event');
|
||||
svc_event.emit('user.email-changed', {
|
||||
user_id: user_id,
|
||||
new_email,
|
||||
});
|
||||
|
||||
invalidate_cached_user_by_id(user_id);
|
||||
let socketio = require('../socketio.js').getio();
|
||||
|
||||
Reference in New Issue
Block a user