This project is read-only.

Recipe Issue: Call to "user create" doesn't seem to happen immediately

Topics: Customizing Orchard, Writing modules
Feb 7, 2012 at 1:53 PM
2 Recipe steps I need to create a test account for my site.....
user create /UserName:"testuser" /Password:"demodemo" /Email:""
myauthorization map "testuser" "44A92BEF-6AF7-4225-A85B-978ED88E07FD"

the call to "myauthorization map" fails as it detects that "testuser" doesn't exist. (in a call to _membershipService.GetUser)
If I remove that line, let the recipe succeed, then call the "myauthorization map" command from the Orchard command line, it works fine. 
Any ideas?
<....Had to use an image for the code btw because I couldn't insert a code snippet today on CodePlex for some reason>


Feb 7, 2012 at 2:12 PM

Resolved: (of course only 5 minutes after I post ;)

At the top of my MapUserToPerson method, I added a call to   _orchardServices.ContentManager.Flush();