This commit is contained in:
2018-12-11 23:34:31 +00:00
parent e0490fdbda
commit 44328e24ec
3 changed files with 11 additions and 10 deletions

View File

@@ -735,6 +735,10 @@ namespace AyaNova.Biz
//Copy values
User i = new User();
//default owner id is manager account in RAVEN
i.OwnerId=1;
i.Name = j["FirstName"].Value<string>() + " " + j["LastName"].Value<string>();
var Temp = j["UserType"].Value<int>();
i.UserType = (UserType)Temp;
@@ -782,11 +786,14 @@ namespace AyaNova.Biz
}
//User options
i.UserOptions=new UserOptions(i.OwnerId);
//TimeZone Offset
var tzo = j["TimeZoneOffset"].Value<decimal>();
//Note: can be null value if not set so need to check for that here specially
var tzo = j["TimeZoneOffset"].Value<decimal?>() ?? 0;
i.UserOptions.TimeZoneOffset = tzo;
//Email address
i.UserOptions.EmailAddress = j["EmailAddress"].Value<string>();

View File

@@ -46,7 +46,7 @@ namespace AyaNova.Models
public User()
{
Tags = new List<string>();
Tags = new List<string>();
}
}