I spent some quality time this past weekend improving how accounts are created in ScrewTurn Wiki when a new user registers in Sueetie. I originally redirected from the Sueetie Registration page to an autologin.aspx page that I created in ScrewTurn to create a Wiki account on ScrewTurn’s own turf. That worked fine and allowed me to get Sueetie on the street more quickly, but it was clumsy and I was never happy with it. A bit of elegance has now surfaced to replace the redirection logic in the form of a single Users.AddUser() method.
One of the bread-n-butter satisfying aspects of the Sueetie Model to me is that I can dig into the code of excellent apps and pick up different approaches to getting stuff done. In this case I was able to explore how ScrewTurn’s file storage-based User Provider adds new accounts so I could duplicate the process on Sueetie user registration. A new user entry in ScrewTurn’s Users.cs file was the only task I needed to accomplish to unify ScrewTurn’s user authentication processes with Sueetie, after all.
The result is a new Sueetie.Wiki class project based on ScrewTurn source code that we’re referencing in our Membership web project. And to be true to Sueetie’s need for speed, the DLL weighs in at only 12 Kilobytes.
The following graphic of the Sueetie ScrewTurn Wiki Solution tells the tale, with the new Users.AddUser() method followed by the original Response.Redirect approach shown for comparison in the WSAT Membership Register.aspx.cs class.
This new method will also be used to add users to Wikis in Sueetie Groups.
Sueetie Groups? Wha?