Fixes issue with deleting external logins, fixes issue with saving new user logins when creating a new user, fixes issue of not checking if the linked login is already linked.
This commit is contained in:
@@ -275,16 +275,23 @@ namespace Umbraco.Core.Models.Identity
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_getLogins != null && _getLogins.IsValueCreated == false)
|
||||
// return if it exists
|
||||
if (_logins != null) return _logins;
|
||||
|
||||
_logins = new ObservableCollection<IIdentityUserLogin>();
|
||||
|
||||
// if the callback is there and hasn't been created yet then execute it and populate the logins
|
||||
if (_getLogins != null && !_getLogins.IsValueCreated)
|
||||
{
|
||||
_logins = new ObservableCollection<IIdentityUserLogin>();
|
||||
foreach (var l in _getLogins.Value)
|
||||
{
|
||||
_logins.Add(l);
|
||||
}
|
||||
//now assign events
|
||||
_logins.CollectionChanged += Logins_CollectionChanged;
|
||||
}
|
||||
|
||||
//now assign events
|
||||
_logins.CollectionChanged += Logins_CollectionChanged;
|
||||
|
||||
return _logins;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user