def _populate_user_from_dn_regex_negation(self):
        """
        Populate the given profile object flags from AUTH_LDAP_PROFILE_FLAGS_BY_DN_REGEX.
        Returns True if the profile was modified
        """
        for field, regex in self.settings.USER_FLAGS_BY_DN_REGEX_NEGATION.items():
            field_value = True
            if re.search(regex, self._get_user_dn(), re.IGNORECASE):
                field_value = False
            setattr(self._user, field, field_value)
def _populate_user_from_dn_regex_negation ( self ) : for field , regex in self . settings . USER_FLAGS_BY_DN_REGEX_NEGATION . items ( ) : field_value = True if re . search ( regex , self . _get_user_dn ( ) , re . IGNORECASE ) : field_value = False setattr ( self . _user , field , field_value )
Populate the given profile object flags from AUTH_LDAP_PROFILE_FLAGS_BY_DN_REGEX.
        Returns True if the profile was modified