DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Bug - Terms not checked on registration of a user

 2 Replies
 0 Subscribed to this topic
 40 Subscribed to this forum
Sort:
Author
Messages
New Around Here
Posts: 4
New Around Here
New Member
New Member
You are a new member!
New Poster
New Poster
Congrats on posting!

There appears to be a bug whereby if a user registers, they are logged in straight away and not prompted to accept the terms until their next login.

Can anyone advise?

Advanced Member
Posts: 207
Advanced Member
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
MVP
MVP
You're an MVP!
New Poster
New Poster
Congrats on posting!

Is there something in the DNN issues?

As a workaround:

Options 1 - Put a statement on the login page that registration is acceptance of the terms and conditions.

Options 2: - Redirect after registration to a private page that only registred users can see.  On the page put some JS that logs the user out by removing the auth cookie.  That will force the login to be displayed and the user will have to login again, forcing the terms and conditions acceptence..  Then after login redirect to the "home" or other page.

 

 

 

Advanced Member
Posts: 207
Advanced Member
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
MVP
MVP
You're an MVP!
New Poster
New Poster
Congrats on posting!

Having thought about it for 2 more seconds, you should NOT login the user after registration?

The best way to do this is have validated registration.   To be honest I can't think of any website we have that has public registration, we alway verify and I suggest you do unless it doesn't match the business requirments, but then you shoudl do something about fake/robot registrations.  This is probably the reason the is not seen as a bug.

Another option is to customise the registration:

here is aChaGPT answer on that: 

Disable Auto-Login via Customization

By default, DNN logs in users immediately after registration (in Public mode). To override that:

Approach:
Customize or override the registration flow:
Extend Register.ascx (or the MVC equivalent in newer versions)

Remove or comment out the login call:

UserController.UserLogin(...)

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved