Beispiel #1
0
        public Domain.Employer findEmployerBy()
        {
            Domain.Employer e = null;
            e = serv.Get(userSubject);
            if (e != null)
            {
                return(e);
            }

            // legacy accounts wont have an email; comes from a claim
            if (userEmail != null)
            {
                e = serv.GetMany(em => em.email == userEmail).SingleOrDefault();
                return(e);
            }
            return(e);
            // if we haven't found by userSubject, and userEmail is null, assume it's a
            // legacy account. Legacy accounts have self-attested emails for userNames
        }
Beispiel #2
0
        public Domain.Employer findEmployerBy()
        {
            Domain.Employer e = null;
            e = serv.Get(userSubject);
            if (e != null)
            {
                return(e);
            }

            // legacy accounts wont have an email; comes from a claim
            if (userEmail != null)
            {
                // If SingleOrDefault, then ~500 users will fail to login.
                // Need solution to de-duplicating employers before getting
                // string on emails duplication
                e = serv.GetMany(em => em.email == userEmail).OrderByDescending(em => em.dateupdated).FirstOrDefault();
                return(e);
            }
            return(e);
            // if we haven't found by userSubject, and userEmail is null, assume it's a
            // legacy account. Legacy accounts have self-attested emails for userNames
        }