/// <summary> /// Is true when the user exist at database but the account is not enabled (never accepted TOU or created a password). /// That happens when: /// - Has a status of 'serviceProfessionalClient' /// - Has a status of 'subscriber' /// </summary> /// <param name="user"></param> /// <returns></returns> private static bool IsUserButNotEnabledAccount(LcRest.UserProfile user) { return( user.accountStatusID == (int)LcEnum.AccountStatus.serviceProfessionalClient || user.accountStatusID == (int)LcEnum.AccountStatus.subscriber ); }
private static LoginResult GetLoginResultForID(int userID, bool returnProfile) { var authKey = LcAuth.GetAutologinKey(userID); LcRest.UserProfile profile = null; if (returnProfile) { profile = LcRest.UserProfile.Get(userID); } return(new LoginResult { redirectUrl = getRedirectUrl(userID), userID = userID, authKey = authKey, profile = profile, onboardingStep = profile == null ? null : profile.onboardingStep }); }
private static LoginResult GetLoginResultForID(LcAuth.UserAuthorization authorization, bool returnProfile) { var authKey = LcAuth.GetAutologinKey(authorization.userID); LcRest.UserProfile profile = null; if (returnProfile) { profile = LcRest.UserProfile.Get(authorization.userID); } return(new LoginResult { redirectUrl = getRedirectUrl(authorization.userID), userID = authorization.userID, authKey = authKey, authToken = authorization.token, //authorization = authorization, profile = profile, onboardingStep = profile == null ? null : profile.onboardingStep }); }