Defect #28833 ยป Function.txt
| 1 |
public static string[] RedGetAllUsersIds() |
|---|---|
| 2 |
{
|
| 3 |
try |
| 4 |
{
|
| 5 |
List<string> UserIds = new List<string>(); |
| 6 |
|
| 7 |
RedmineManager = new RedmineManager(host, apiKey); |
| 8 |
|
| 9 |
var users = RedmineManager.GetObjects<User>(new NameValueCollection() |
| 10 |
{
|
| 11 |
{RedmineKeys.STATUS, ((int) UserStatus.STATUS_ACTIVE).ToString(CultureInfo.InvariantCulture)}
|
| 12 |
}); |
| 13 |
|
| 14 |
foreach (var user in users) |
| 15 |
{
|
| 16 |
UserIds.Add(user.Id.ToString()); |
| 17 |
} |
| 18 |
return UserIds.ToArray(); |
| 19 |
} |
| 20 |
catch(Exception ex) |
| 21 |
{
|
| 22 |
lastException = ex; |
| 23 |
return null; |
| 24 |
} |
| 25 |
} |