twilio fix
This commit is contained in:
parent
d022ecf960
commit
70c772cd3b
8 changed files with 127 additions and 45 deletions
|
@ -208,7 +208,14 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
|||
|
||||
var user = WspContext.Services.Organizations.GetUserGeneralSettings(accessToken.ItemId, accessToken.AccountId);
|
||||
|
||||
if (string.IsNullOrEmpty(user.MobilePhone))
|
||||
var settings = WspContext.Services.System.GetSystemSettingsActive(EnterpriseServer.SystemSettings.TWILIO_SETTINGS, false);
|
||||
|
||||
bool twilioEnabled = settings != null
|
||||
&& !string.IsNullOrEmpty(settings.GetValueOrDefault(EnterpriseServer.SystemSettings.TWILIO_ACCOUNTSID_KEY, string.Empty))
|
||||
&& !string.IsNullOrEmpty(settings.GetValueOrDefault(EnterpriseServer.SystemSettings.TWILIO_AUTHTOKEN_KEY, string.Empty))
|
||||
&& !string.IsNullOrEmpty(settings.GetValueOrDefault(EnterpriseServer.SystemSettings.TWILIO_PHONEFROM_KEY, string.Empty));
|
||||
|
||||
if (string.IsNullOrEmpty(user.MobilePhone) || twilioEnabled == false)
|
||||
{
|
||||
var result = WspContext.Services.Organizations.SendResetUserPasswordPincodeEmail(accessToken.AccessTokenGuid, user.PrimaryEmailAddress);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue