v1.1.2.0
This commit is contained in:
@@ -84,7 +84,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
SaxUserSport.Params prmUserSport = new SaxUserSport.Params();
|
||||
prmUserSport.UserAccountIdsIncluded.Add(SessionData.User.UserAccountId);
|
||||
prmUserSport.StatusCat = SaxUserSport.StatusCat.NotDeleted;
|
||||
model.DataItemTotal = (ulong)AccountMgr.GetUserSportCount(prmUserSport);
|
||||
model.Paging.ItemTotal = (ulong)AccountMgr.GetUserSportCount(prmUserSport);
|
||||
model.PopulatePagingTo(prmUserSport.ResultsPaging);
|
||||
|
||||
// Item columns.
|
||||
@@ -106,12 +106,10 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
prmUserSport.SortColumns.Add(colSportName);
|
||||
|
||||
// Query items.
|
||||
model.DataItemCount = 0;
|
||||
using (DbResultSet resultSet = AccountMgr.ExecuteUserSportQuery(columns, prmUserSport))
|
||||
{
|
||||
while (resultSet != null && resultSet.HasRows && resultSet.NextRecord())
|
||||
{
|
||||
model.DataItemCount++;
|
||||
NamedValue.Map values = resultSet.GetRecordValues();
|
||||
ProfileSportResponseData_List userSportData = new ProfileSportResponseData_List()
|
||||
{
|
||||
@@ -126,6 +124,8 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
responseData.Sports.Add(userSportData);
|
||||
}
|
||||
}
|
||||
if (model.Paging.IsPaged)
|
||||
model.Paging.ItemCount = (ushort)responseData.Sports.Count;
|
||||
|
||||
// Complete response.
|
||||
responseData.SetPaging(model);
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
prmArticle.UserAccountIdsJournalistIncluded.Add(sessionData.User.UserAccountId);
|
||||
prmArticle.ArticleFilter = model.Filter.Article;
|
||||
prmArticle.StatusCat = SaxJournalistArticle.StatusCat.NotDeleted;
|
||||
model.DataItemTotal = (ulong)ActivityMgr.GetJournalistArticleCount(prmArticle);
|
||||
model.Paging.ItemTotal = (ulong)ActivityMgr.GetJournalistArticleCount(prmArticle);
|
||||
model.PopulatePagingTo(prmArticle.ResultsPaging);
|
||||
|
||||
// Item columns.
|
||||
@@ -165,12 +165,10 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
prmArticle.SortColumns.Add(colCreatedOn);
|
||||
|
||||
// Query items.
|
||||
model.DataItemCount = 0;
|
||||
using (DbResultSet resultSet = ActivityMgr.ExecuteJournalistArticleQuery(columns, prmArticle))
|
||||
{
|
||||
while (resultSet != null && resultSet.HasRows && resultSet.NextRecord())
|
||||
{
|
||||
model.DataItemCount++;
|
||||
NamedValue.Map values = resultSet.GetRecordValues();
|
||||
ArticleData_List articleData = new ArticleData_List()
|
||||
{
|
||||
@@ -187,6 +185,8 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
responseData.Articles.Add(articleData);
|
||||
}
|
||||
}
|
||||
if (model.Paging.IsPaged)
|
||||
model.Paging.ItemCount = (ushort)responseData.Articles.Count;
|
||||
|
||||
// Complete response.
|
||||
responseData.SetPaging(model);
|
||||
@@ -317,7 +317,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
prmItemImage.ItemIdsIncluded.Add(imageItemId);
|
||||
prmItemImage.ImageTypesIncluded.Add(Sax.ImageType.Article);
|
||||
prmItemImage.ImageTypesIncluded.Add(Sax.ImageType.ArticleUpload);
|
||||
prmItemImage.StatusCat = SaxItemImage.StatusCat.Deleted;
|
||||
prmItemImage.StatusCat = SaxItemImage.StatusCat.DeletedOnly;
|
||||
prmItemImage.ResultsPaging.PageLength = 1;
|
||||
prmItemImage.ResultsPaging.PageNo = 1;
|
||||
List<SaxItemImage> itemImages = ItemDataMgr.GetItemImageList(prmItemImage);
|
||||
|
||||
@@ -45,8 +45,8 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
|
||||
// Paging.
|
||||
Model_Journalist model = new Model_Journalist(Localiser);
|
||||
model.DataPageNo = 1;
|
||||
model.DataPageLength = 6;
|
||||
model.Paging.PageNo = 1;
|
||||
model.Paging.PageLength = 6;
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
+3
-3
@@ -135,7 +135,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
prmOpportunity.OrganisationIdsIncluded.Add(organisationId);
|
||||
prmOpportunity.OpportunityFilter = model.Filter.Opportunity;
|
||||
prmOpportunity.StatusCat = SaxOrganisationOpportunity.StatusCat.NotDeleted;
|
||||
model.DataItemTotal = (ulong)ActivityMgr.GetOrganisationOpportunityCount(prmOpportunity);
|
||||
model.Paging.ItemTotal = (ulong)ActivityMgr.GetOrganisationOpportunityCount(prmOpportunity);
|
||||
model.PopulatePagingTo(prmOpportunity.ResultsPaging);
|
||||
|
||||
// Item columns.
|
||||
@@ -164,12 +164,10 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
prmOpportunity.SortColumns.Add(colCreatedOn);
|
||||
|
||||
// Query items.
|
||||
model.DataItemCount = 0;
|
||||
using (DbResultSet resultSet = ActivityMgr.ExecuteOrganisationOpportunityQuery(columns, prmOpportunity))
|
||||
{
|
||||
while (resultSet != null && resultSet.HasRows && resultSet.NextRecord())
|
||||
{
|
||||
model.DataItemCount++;
|
||||
NamedValue.Map values = resultSet.GetRecordValues();
|
||||
OpportunityData_List opportunityData = new OpportunityData_List()
|
||||
{
|
||||
@@ -190,6 +188,8 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
}
|
||||
}
|
||||
}
|
||||
if (model.Paging.IsPaged)
|
||||
model.Paging.ItemCount = (ushort)responseData.Opportunities.Count;
|
||||
|
||||
// Complete response.
|
||||
responseData.SetPaging(model);
|
||||
|
||||
@@ -4,6 +4,7 @@ using Sarand.Net.Standard.Base.Bus;
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
using Sarand.Net.Standard.Base.Dbas;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using Saxonite.Net.Core.Web.Online.App;
|
||||
using Saxonite.Net.Core.Web.Online.Models;
|
||||
using Saxonite.Net.Standard.Base.App;
|
||||
using Saxonite.Net.Standard.Base.Bus;
|
||||
@@ -77,7 +78,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
prmOrganisation.SportIdsIncluded.AddId(model.Filter.SportId.ToSysId());
|
||||
prmOrganisation.StatusCat = SaxOrganisation.StatusCat.ActiveOnly;
|
||||
prmOrganisation.SortColumns.Add(colOrganisationName);
|
||||
model.DataItemTotal = (ulong)AccountMgr.GetOrganisationCount(prmOrganisation);
|
||||
model.Paging.ItemTotal = (ulong)AccountMgr.GetOrganisationCount(prmOrganisation);
|
||||
model.PopulatePagingTo(prmOrganisation.ResultsPaging);
|
||||
using (DbResultSet resultSet = AccountMgr.ExecuteOrganisationQuery(columns, prmOrganisation))
|
||||
{
|
||||
@@ -96,6 +97,8 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
responseData.Organisations.Add(organisationData);
|
||||
}
|
||||
}
|
||||
if (model.Paging.IsPaged)
|
||||
model.Paging.ItemCount = (ushort)responseData.Organisations.Count;
|
||||
|
||||
// Complete response.
|
||||
responseData.SetPaging(model);
|
||||
@@ -103,6 +106,169 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
return Json(responseData);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Request Organisation ajax request.
|
||||
//-------------------------------------------------------------------
|
||||
private class AjaxResponse_RequestOrganisation : AjaxResponse_Data
|
||||
{
|
||||
// Construction.
|
||||
public AjaxResponse_RequestOrganisation(SaxModel_Online model) : base(model) { }
|
||||
// Organisation list.
|
||||
public List<OrganisationResponseData> Organisations { get; } = new List<OrganisationResponseData>();
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
[HttpPost]
|
||||
[Route("Organisation/Ajax/RequestOrganisation")]
|
||||
public IActionResult Ajax_RequestOrganisation(Model_Organisation model)
|
||||
{
|
||||
String fn = GetType().Name + ".Ajax_RequestOrganisation";
|
||||
String messageTitle = Localiser["organisation.caption.organisation.request"];
|
||||
AjaxResponse_RequestOrganisation responseData = new AjaxResponse_RequestOrganisation(model);
|
||||
|
||||
// Validate session and referrer. User does not need to be logged in.
|
||||
if (!ValidReferer)
|
||||
return Forbid();
|
||||
SaxSessionData_Online sessionData = SessionData_Online;
|
||||
|
||||
if (!model.ValidateOrganisationRequestData(responseData))
|
||||
return Json(responseData);
|
||||
|
||||
// Check Regions.
|
||||
SaxRegion regionCountry = Internals.GetRegion(model.OrganisationRegionIdCountry.ToSysId());
|
||||
if (SysId.IsValid(model.OrganisationRegionIdCountry.ToSysId()) && regionCountry == null)
|
||||
{
|
||||
SaLogger.Warn(fn + " Country region not found. Id: " + model.OrganisationRegionIdCountry + ". " + getLogSuffix());
|
||||
return Json(responseData.SetGoHome(messageTitle, Localiser["msg.error.system"]));
|
||||
}
|
||||
SaxRegion regionProvince = Internals.GetRegion(model.OrganisationAddressRegionIdProvince.ToSysId());
|
||||
if (SysId.IsValid(model.OrganisationAddressRegionIdProvince.ToSysId()) && regionProvince == null)
|
||||
{
|
||||
SaLogger.Warn(fn + " Province region not found. Id: " + model.OrganisationAddressRegionIdProvince + ". " + getLogSuffix());
|
||||
return Json(responseData.SetGoHome(messageTitle, Localiser["msg.error.system"]));
|
||||
}
|
||||
|
||||
// User does not need to be logged in, but user details must be supplied if not.
|
||||
SaxUserAccount userAccount = null;
|
||||
if (ValidUserSession)
|
||||
{
|
||||
// Check that an email address hasn't been supplied.
|
||||
// NB Shouldn't happen as contact controls aren't displayed if user is logged in,
|
||||
// hence 'System' error response and nothing more specific.
|
||||
if (!StringUtil.IsEmpty(model.ContactEmailAddress))
|
||||
{
|
||||
SaLogger.Warn(fn + " Contact Email supplied when user logged in. " + getLogSuffix());
|
||||
return Json(responseData.SetGoHome(messageTitle, Localiser["msg.error.system"]));
|
||||
}
|
||||
// Retrieve user account.
|
||||
userAccount = AccountMgr.GetUserAccountById(sessionData.User.UserAccountId);
|
||||
if (userAccount == null)
|
||||
return Json(responseData.SetGoHome(messageTitle, Localiser["msg.error.system"]));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Double check that contact details have been supplied - validated by model above.
|
||||
if (StringUtil.IsEmpty(model.ContactEmailAddress) || StringUtil.IsEmpty(model.ContactFirstName) || StringUtil.IsEmpty(model.ContactLastName))
|
||||
{
|
||||
SaLogger.Warn(fn + " Incomplete contact details supplied.");
|
||||
return Json(responseData.SetGoHome(messageTitle, Localiser["msg.error.system"]));
|
||||
}
|
||||
// Check that the email doesn't exist.
|
||||
// NB This is validated by the model and shouldn't be required here.
|
||||
userAccount = AccountMgr.GetUserAccountByEmailAddress(model.ContactEmailAddress);
|
||||
if (userAccount != null)
|
||||
return Json(responseData.SetGoHome(messageTitle, Localiser["msg.error.system"]));
|
||||
userAccount = AccountMgr.CreateUserAccount();
|
||||
userAccount.EmailAddress = model.ContactEmailAddress;
|
||||
userAccount.FirstName = model.ContactFirstName;
|
||||
userAccount.LastName = model.ContactLastName;
|
||||
if (!AccountMgr.InsertUserAccount(userAccount, DbUpdateInfo))
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to insert user contact - " + AccountMgr.ErrorStateMessage);
|
||||
return Json(responseData.SetGoHome(messageTitle, Localiser["msg.error.system"]));
|
||||
}
|
||||
}
|
||||
|
||||
if (SysId.IsValid(model.OrganisationSportId.ToSysId()))
|
||||
{
|
||||
// Add User Sport if not already present.
|
||||
// NB This will also reactivate an inactive or deleted User Sport.
|
||||
SaxUserSport.Params prmUserSport = new SaxUserSport.Params();
|
||||
prmUserSport.UserAccountIdsIncluded.Add(userAccount.Id);
|
||||
prmUserSport.SportIdsIncluded.Add(model.OrganisationSportId.ToSysId());
|
||||
prmUserSport.StatusCat = SaxUserSport.StatusCat.Any;
|
||||
SaxUserSport userSport = AccountMgr.GetUserSport(prmUserSport);
|
||||
if (userSport == null)
|
||||
userSport = AccountMgr.CreateUserSport(userAccount.Id, model.OrganisationSportId.ToSysId());
|
||||
userSport.Status = SaxUserSport.DefaultStatus;
|
||||
if (!SysId.IsValid(userSport.Id))
|
||||
{
|
||||
if (!AccountMgr.InsertUserSport(userSport, DbUpdateInfo))
|
||||
{
|
||||
// Logg error but don't abort the request.
|
||||
SaLogger.Warn(fn + " Failed to insert User Sport: " + AccountMgr.ErrorStateMessage);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!AccountMgr.UpdateUserSport(userSport, DbUpdateInfo))
|
||||
{
|
||||
// Logg error but don't abort the request.
|
||||
SaLogger.Warn(fn + " Failed to update User Sport: " + AccountMgr.ErrorStateMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create Organisation.
|
||||
SaxOrganisation organisation = AccountMgr.CreateOrganisation();
|
||||
organisation.Name = model.OrganisationName;
|
||||
organisation.OrganisationType = model.GetOrganisationType();
|
||||
organisation.OrganisationCategory = model.GetOrganisationCategory();
|
||||
organisation.SportIdPrimary = model.OrganisationSportId.ToSysId();
|
||||
organisation.RegionIdPrimary = model.OrganisationRegionIdCountry.ToSysId();
|
||||
organisation.PhoneMain = model.OrganisationPhoneMain;
|
||||
organisation.Status = SaStatus.Awaiting;
|
||||
if (!AccountMgr.InsertOrganisation(organisation, DbUpdateInfo))
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to insert organisation - " + AccountMgr.ErrorStateMessage);
|
||||
return Json(responseData.SetGoHome(messageTitle, Localiser["msg.error.system"]));
|
||||
}
|
||||
|
||||
// Add user as member of organisation.
|
||||
SaxUserOrganisation userOrganisation = AccountMgr.CreateUserOrganisation(userAccount.Id, organisation.Id);
|
||||
userOrganisation.OrganisationRoles.Add(Sax.OrganisationRole.Member);
|
||||
if (!AccountMgr.InsertUserOrganisation(userOrganisation, DbUpdateInfo))
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to insert user organisation - " + AccountMgr.ErrorStateMessage);
|
||||
return Json(responseData.SetGoHome(messageTitle, Localiser["msg.error.system"]));
|
||||
}
|
||||
|
||||
// Create Organisation address.
|
||||
SaxItemAddress organisationAddress = ItemDataMgr.CreateItemAddress(organisation.GetItemId(), Sax.AddressType.Office);
|
||||
organisationAddress.Line1 = model.OrganisationAddressLine1;
|
||||
organisationAddress.Line2 = model.OrganisationAddressLine2;
|
||||
organisationAddress.Line3 = model.OrganisationAddressLine3;
|
||||
organisationAddress.Town = model.OrganisationAddressTown;
|
||||
organisationAddress.Province = model.OrganisationAddressProvince;
|
||||
organisationAddress.RegionIdProvince = model.OrganisationAddressRegionIdProvince.ToSysId();
|
||||
if (SysId.IsValid(regionCountry.Id))
|
||||
{
|
||||
organisationAddress.Country = regionCountry.Name;
|
||||
organisationAddress.RegionIdCountry = regionCountry.Id;
|
||||
}
|
||||
else organisationAddress.Country = model.OrganisationAddressCountry;
|
||||
organisationAddress.PostalCode = model.OrganisationAddressPostalCode;
|
||||
if (!ItemDataMgr.InsertItemAddress(organisationAddress, DbUpdateInfo))
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to insert organisation address - " + ItemDataMgr.ErrorStateMessage);
|
||||
return Json(responseData.SetGoHome(messageTitle, Localiser["msg.error.system"]));
|
||||
}
|
||||
|
||||
// Complete response.
|
||||
responseData.SetMessage(messageTitle, Localiser["msg.organisation.request.success"].ToString().ReplaceAll("\n", "<br>"));
|
||||
responseData.Success = true;
|
||||
return Json(responseData);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Get Member Organisation List ajax request.
|
||||
//-------------------------------------------------------------------
|
||||
@@ -148,7 +314,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
prmUserOrganisation.OrganisationMembersOnly = true;
|
||||
prmUserOrganisation.StatusCat = SaxUserOrganisation.StatusCat.ActiveOnly;
|
||||
prmUserOrganisation.SortColumns.Add(colOrganisationName);
|
||||
model.DataItemTotal = (ulong)AccountMgr.GetUserOrganisationCount(prmUserOrganisation);
|
||||
model.Paging.ItemTotal = (ulong)AccountMgr.GetUserOrganisationCount(prmUserOrganisation);
|
||||
model.PopulatePagingTo(prmUserOrganisation.ResultsPaging);
|
||||
using (DbResultSet resultSet = AccountMgr.ExecuteUserOrganisationQuery(columns, prmUserOrganisation))
|
||||
{
|
||||
@@ -167,6 +333,8 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
responseData.Organisations.Add(organisationData);
|
||||
}
|
||||
}
|
||||
if (model.Paging.IsPaged)
|
||||
model.Paging.ItemCount = (ushort)responseData.Organisations.Count;
|
||||
|
||||
// Complete response.
|
||||
responseData.SetPaging(model);
|
||||
|
||||
@@ -360,15 +360,15 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
private void PopulateRequestPasswordEmailBody(SaEmailData emailData, SaxUserAccount userAccount)
|
||||
{
|
||||
// Will need to handle culture (language/country) as and when introduced.
|
||||
emailData.MessageBody = SaxResourceHelper.GetTextResource(SaxResourceHelper.TextResource.Email_RequestPassword_Html);
|
||||
emailData.MessageBody = SaxResourceHelper.GetTextResource(SaxResourceHelper.TextResource.Email_Security_RequestPassword_Html);
|
||||
emailData.HtmlBody = true;
|
||||
|
||||
// Replace dynamic tags.
|
||||
EmailConsole.ReplaceDynamicEmailBodyTags(emailData, null, userAccount);
|
||||
|
||||
// Replace dynamic tag for link back to change password page.
|
||||
SaEmailConsole.ReplaceDynamicEmailTag(emailData, "[#Link.RequestPassword]", GenerateRequestPasswordLink(userAccount.Id, userAccount.EmailAddress, ""));
|
||||
SaEmailConsole.ReplaceDynamicEmailTag(emailData, "[#Link.ExpiresMinutes]", GetRequestPasswordEmailLinkExpiresMinutes().ToString());
|
||||
SaEmailConsole.ReplaceDynamicEmailTag(emailData, "[#Link.RequestPassword]", GenerateRequestPasswordLink(this, userAccount.Id, userAccount.EmailAddress, ""));
|
||||
SaEmailConsole.ReplaceDynamicEmailTag(emailData, "[#Link.ExpiresMinutes]", GetRequestPasswordEmailLinkExpiresMinutes(this).ToString());
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -383,21 +383,21 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
private static String Base64Key_RequestPassword { get; } = SacsEncryptionHelper.EncodePlainKey("{~Saxonite@@Request^Password=}", SacsEncryptionHelper.KeyLength);
|
||||
private static String Base64IV_RequestPassword_Generated { get; } = SacsEncryptionHelper.InitSymmetricEncryptionIV(Base64Key_RequestPassword);
|
||||
private static String Base64IV_RequestPassword { get; } = "1VAWYTW6d72n/6HDNhbqow==";
|
||||
private String GenerateRequestPasswordLink(SysId userAccountId, String emailAddress, String requestPasswordToken)
|
||||
internal static String GenerateRequestPasswordLink(SaxController_Online controller, SysId userAccountId, String emailAddress, String requestPasswordToken)
|
||||
{
|
||||
NameValueCollection parameters = new NameValueCollection();
|
||||
parameters.Add(ParamName_UserAccountId, SysId.ToString(userAccountId));
|
||||
parameters.Add(ParamName_EmailAddress, emailAddress);
|
||||
parameters.Add(ParamName_ExpiresAt, DateUtil.Format(DateTime.Now.AddMinutes(GetRequestPasswordEmailLinkExpiresMinutes()), DateUtil.Format_XmlDateTime));
|
||||
parameters.Add(ParamName_ExpiresAt, DateUtil.Format(DateTime.Now.AddMinutes(GetRequestPasswordEmailLinkExpiresMinutes(controller)), DateUtil.Format_XmlDateTime));
|
||||
parameters.Add(ParamName_Token, requestPasswordToken);
|
||||
String link =
|
||||
GetRedirectLocation(RedirectLocation.WebAppBase) + "Security/ChangePassword?" +
|
||||
ParamName_RequestPasswordEncrypted + "=" + HttpUtility.UrlEncode(EncryptParameters(parameters, Base64IV_RequestPassword, Base64Key_RequestPassword));
|
||||
controller.GetRedirectLocation(RedirectLocation.WebAppBase) + "Security/ChangePassword?" +
|
||||
ParamName_RequestPasswordEncrypted + "=" + HttpUtility.UrlEncode(controller.EncryptParameters(parameters, Base64IV_RequestPassword, Base64Key_RequestPassword));
|
||||
return link;
|
||||
}
|
||||
private int GetRequestPasswordEmailLinkExpiresMinutes()
|
||||
internal static int GetRequestPasswordEmailLinkExpiresMinutes(SaxController_Online controller)
|
||||
{
|
||||
int expiresMinutes = SessionConfig.Security.SignIn.PasswordRequest.EmailLinkExpiresMins;
|
||||
int expiresMinutes = controller.SessionConfig.Security.SignIn.PasswordRequest.EmailLinkExpiresMins;
|
||||
int expiresMinutes_Min = Sax.Config.Security.SignIn.PasswordRequest.EmailLinkExpiresMins_Min;
|
||||
int expiresMinutes_Max = Sax.Config.Security.SignIn.PasswordRequest.EmailLinkExpiresMins_Max;
|
||||
return Math.Max(expiresMinutes_Min, Math.Min(expiresMinutes_Max, expiresMinutes));
|
||||
|
||||
Reference in New Issue
Block a user