Add empty crypto and fix user validator compilation
This commit is contained in:
parent
b13d26cab6
commit
bc756706aa
|
|
@ -0,0 +1,17 @@
|
||||||
|
#if K10
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
//using System.Security.Cryptography;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNet.Identity
|
||||||
|
{
|
||||||
|
public class Foo
|
||||||
|
{
|
||||||
|
public Foo()
|
||||||
|
{
|
||||||
|
System.Security.Cryptography.Rfc2898DeriveBytes foo = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
#if NET45
|
||||||
using System.Net.Mail;
|
using System.Net.Mail;
|
||||||
|
#endif
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
@ -96,6 +98,7 @@ namespace Microsoft.AspNet.Identity
|
||||||
errors.Add(String.Format(CultureInfo.CurrentCulture, Resources.PropertyTooShort, "Email"));
|
errors.Add(String.Format(CultureInfo.CurrentCulture, Resources.PropertyTooShort, "Email"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#if NET45
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var m = new MailAddress(email);
|
var m = new MailAddress(email);
|
||||||
|
|
@ -105,6 +108,7 @@ namespace Microsoft.AspNet.Identity
|
||||||
errors.Add(String.Format(CultureInfo.CurrentCulture, Resources.InvalidEmail, email));
|
errors.Add(String.Format(CultureInfo.CurrentCulture, Resources.InvalidEmail, email));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
var owner = await Manager.FindByEmail(email);
|
var owner = await Manager.FindByEmail(email);
|
||||||
if (owner != null && !EqualityComparer<TKey>.Default.Equals(owner.Id, user.Id))
|
if (owner != null && !EqualityComparer<TKey>.Default.Equals(owner.Id, user.Id))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue