Orchard CMS ask for an invite token to link to backend data during registration using workflows only
I am using Orchard CMS v1.9 and want to display a custom registration page to accept the usual username/password/email and an additional token (invite token). The token will be used to match the user to some to custom data on the server.
Disclaimer: This approach is currently based on Orchard 1.10 but was initially developed on the 1.9.x branch. It does not rely on Dynamic Forms and Workflows, but I think you could achieve something similar with those modules.
Okay so I ended up building an example module with our approach to extended users / activation system. I stripped out a lot of code, but also let some juicy parts, which aren't directly related to your answer, in it.
First you should check out the UsersController it has the activate actions you are searching for. You may need to extend the orchard LogOn-View and include some GET & POST Actions accordingly.
public ActionResult Activate(string activationCode)
// validation stuff....
var viewModel = new CustomUserActivate
// This is the activationCode you're looking for
ActivationCode = userFromActivationCode.ActivationCode,
UserName = userFromActivationCode.User.UserName,
WelcomeText = userFromActivationCode.WelcomeText,
Email = userFromActivationCode.User.Email
public ActionResult Activate(CustomUserActivate input)
if ( input == null )
this.ModelState.AddModelError("_form", this.T("The argument cannot be null").Text);
CustomUserPart customUserPart = null;
if ( this.ModelState.IsValid )
customUserPart = this.myService.GetCustomUserByActivationCode(input.ActivationCode);
if ( customUserPart == null || customUserPart.User == null || customUserPart.User.UserName != input.UserName )
this.notifier.Add(NotifyType.Error, this.T("The activation failed"));
if ( string.IsNullOrE
Asked in February 2016Viewed 2,275 timesVoted 12Answered 1 times