[#8558] make sure all user prefs changes get indexed by solr
diff --git a/Allura/allura/controllers/auth.py b/Allura/allura/controllers/auth.py
index cade4f9..61bfd7d 100644
--- a/Allura/allura/controllers/auth.py
+++ b/Allura/allura/controllers/auth.py
@@ -623,7 +623,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
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index 7465222..0b73f1b 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -865,6 +865,11 @@ def registration_date(self):
p = plugin.AuthenticationProvider.get(request)
return p.user_registration_date(self)
+ # overriding since the old and new values are not being tracked for changes within a dictionary like preferences
+ # This will ensure any changes get indexed by solr.
+ def should_update_index(self, old_doc, new_doc):
+ return True
+
class ProjectRole(MappedClass):
"""