17 lines
463 B
C#
17 lines
463 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Microsoft.AspNetCore.Identity;
|
|
|
|
namespace Umbraco.Extensions
|
|
{
|
|
public static class IdentityExtensions
|
|
{
|
|
public static string ToErrorMessage(this IEnumerable<IdentityError> errors)
|
|
{
|
|
if (errors == null) throw new ArgumentNullException(nameof(errors));
|
|
return string.Join(", ", errors.Select(x => x.Description).ToList());
|
|
}
|
|
}
|
|
}
|