CS Tidbits #8: A Couple Of CS User Tips

I’ve seen this pop up on the CS.org forums on more than one occasion so I thought I’d mention them in this edition of CS Tidbits (another two for Tuesday deal):

  • How do I restrict my CS site to only registered users?
  • How do I redirect users to their profile page after they register so they can update their preferences (by default, CS redirects back to the page the user last visited before registering)?

Both of these can be accomplished by simple edits to your configuration files, and some site admins may not be familiar with the locations to do this. The first bullet can be accomplished in your Web.Config file by first commenting out all of the <location> elements, and then adding the following directly under the closing </authorization> element:

<authorization>
<deny users="?" />
</authorization>

Also you will need to add the following <location> element so that anonymous users can register for a new account:

<location path="CreateUser.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>

This disallows any anonymous users to your site, and will redirect all anonymous users to your login page where they can then sign in if they have an account. They can however click the Sign Up link to get a new account if they don’t have one.

The second bullet point is accomplished by editing your SiteUrls.config file. Search for the user_Register element, and change path="CreateUser.aspx?ReturnUrl={0}” to path="CreateUser.aspx?ReturnUrl=/user/editprofile.aspx” New users will now be redirected to their profile page (which is a little unintuitive to find for new CS end users…by default you have to click your login name in the top right corner of the page which isn’t the most obvious solution) where they can then update their site preferences such as signature, timezone, default editor, etc.

No comments yet