Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.52 KB | None | 0 0
  1.   Private Function CreateAccount(ByVal mailServerId As Long, emailAddress As String, givenName As String, surname As String,
  2.                                    mobileNumber As String, displayName As String, description As String, subscriptionId As Long, companyId As Long,
  3.                                    password As String) As String
  4.         Dim sendSms = Request.Form("sendsms")
  5.         DebugMessage &= "Create Account: " & emailAddress & ", givenName:" & givenName & ", surname:" & surname & ", mobileNumber:" & mobileNumber &
  6.             ", displayName:" & displayName & ", description:" & description & ", sendSms:" & sendSms & " <br/>"
  7.         Dim driverStatus As Long
  8.         Dim input As Object = PopulateCreateAccountInput(mailServerId, emailAddress, givenName, surname, mobileNumber, displayName, description, subscriptionId, password)
  9.         Dim driverResultCreate As String = GetDriverResultWithStatus(mailServerId, "MAIL_ACCOUNT_CREATE", input, driverStatus)
  10.         If driverStatus > 0 Then
  11.             Return driverResultCreate
  12.         End If
  13.  
  14.         SetEmailAddressOnSubscription(emailAddress, subscriptionId, companyId, mailServerId)
  15.         If sendSms = "true" Then
  16.             SendSmsPassword(subscriptionId, mobileNumber, password, emailAddress)
  17.         End If
  18.  
  19.         Dim driverResultQuota = SetQuotaOnAccount(mailServerId, emailAddress, subscriptionId, driverStatus)
  20.         If driverStatus > 0 Then
  21.             Return driverResultQuota
  22.         End If
  23.  
  24.         Return driverResultCreate
  25.     End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement