#8558 user email changes not getting into solr

unreleased
open
nobody
None
General
nobody
2024-04-25
2024-04-25
No

For example, when a primary email address is deleted on a user, and one of their other emails becomes the primary, that doesn't get into solr. So /nf/admin/search_users has old results

IndexerSessionExtension only indexes Users changes. I think if an email address record is added or deleted, we probably want to trigger a user index then.

Also (and maybe even more importantly) the user.set_pref('email_address', primary_addr) call doesn't make IndexerSessionExtension do anything which is surprising since that is a field saved on the user record directly. Need to figure out why.

minor, kinda related, I think this should be fixed:

--- Allura/allura/controllers/auth.py
+++ Allura/allura/controllers/auth.py
@@ -617,7 +617,7 @@ def _update_emails(self, user, admin=False, form_params={}):
                     flash('You must provide your current password to delete an email', 'error')
                     return
                 if primary_addr == user.email_addresses[i]:
-                    if select_new_primary_addr(user, ignore_emails=primary_addr) is None \
+                    if select_new_primary_addr(user, ignore_emails=[primary_addr]) is None \
                             and asbool(config.get('auth.require_email_addr', False)):
                         flash('You must have at least one verified email address.', 'error')
                         return

Discussion


Log in to post a comment.