Ejemplo n.º 1
0
 public virtual bool HasLogin(UserLoginInfo info)
 {
     return(Logins.Any(x => x.LoginProvider == info.LoginProvider && x.ProviderKey == info.ProviderKey));
 }
 public virtual bool HasLogin(string loginProvider, string providerKey)
 {
     return(HasLogins() && Logins.Any(i =>
                                      i.LoginProvider.Equals(loginProvider, StringComparison.OrdinalIgnoreCase) &&
                                      i.ProviderKey.Equals(providerKey, StringComparison.OrdinalIgnoreCase)));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Checks if the user has the given <see cref="UserLoginInfo"/>.
 /// </summary>
 /// <param name="userLoginInfo">The <see cref="UserLoginInfo"/> we are looking for.</param>
 /// <returns>True if the user has the given <see cref="UserLoginInfo"/>.</returns>
 public virtual bool HasLogin(UserLoginInfo userLoginInfo)
 {
     return(Logins.Any(e => e.LoginProvider == userLoginInfo.LoginProvider));
 }
 public virtual bool HasLogins()
 {
     return(Logins != null && Logins.Any());
 }