I use an external wcf service that registers users. I obtain the registration verification code with the code below. It worked great until I upgraded my dll's to 7.3 -- now I get the NullReferenceException error message below. Any idea why or if there's an alternate way to get the verification code? Everything else works fine.
TokenReplace tr = newTokenReplace(Scope.SystemMessages, oUser.Profile.PreferredLocale, currentPortal, oUser);
tr.AccessingUser = newUserController().GetUser(currentPortal.PortalId, currentPortal.AdministratorId);
string verificationCode = tr.ReplaceEnvironmentTokens("[User:VerificationCode]");
Error message:
System.NullReferenceException: Object reference not set
to an instance of an object.
at
DotNetNuke.Entities.Users.UserInfo.GetProperty(String propertyName, String
format, CultureInfo formatProvider, UserInfo accessingUser, Scope currentScope,
Boolean& propertyNotFound)
at
DotNetNuke.Services.Tokens.BaseCustomTokenReplace.replacedTokenValue(String
strObjectName, String strPropertyName, String strFormat)
at
DotNetNuke.Services.Tokens.BaseTokenReplace.ReplaceTokens(String strSourceText)
at
DotNetNuke.Services.Tokens.TokenReplace.ReplaceTokens(String strSourceText)
at
APService.Controller.UserRegistration.RegisterUser() in
c:.....UserRegistration.cs:line 87