0

I would like to force specifics users (that not contains 'mydom' in their email address) to view and accept disclaimer on their first visit.

They must accept it, or they got disconnected.

Then, If it's still their first visit, they should be redirected to a ChangePassword.aspx page, while they did not change their password, they got disconnected.

Then, if all is good, they'd finally reach the "home.aspx" page.

I saw post like How to create a custom FBA login Page that forces user to change password and view license agreement if required and Prompt My Site users to accept Terms of Use Agreement on first visit but the second one provide a dead link. The first on is interesting, but I'm using windows authentication, and not FBA ... As I'm not a real dev., it's hard for me to modify the code to suit my needs.

Feel free to ask for more details. TIA.

1 Answer 1

1

This is how you may approach it using a Delegate control.

  1. Create a list which will contain three columns: Username, DisclaimerAccepted, PasswordChanged.
  2. Create an ascx user control. The control will contain the logic of reading the the information about the current user from the list created in step 1.
  3. If user has not accepted the disclaimer, redirect it to a page (may be a layouts page). Once the user accepts the disclaimer, redirect it to Password change page if the user hasn't changed the apssword yet.

So, your solution will contain two pages (disclaimer, password change), and an ascx control. The .ascx control can be registered as delegate control in additional page head control.

3
  • Thanks @NadeemYousuf . Can you provide me a link that'd explain this or which would provide examples ? I didn't learn development, so I must admit that this is hard for me to understand (but I do understand the concept).
    – Nico
    Commented Mar 17, 2015 at 12:24
  • A question: If I let them login in, then they land on a custom page (let's say myhome.aspx), in this page, I can't get their AD Attributes because they are logged in ? If I could, I would just retrieve those attributes, then redirect them if needed, or show EULA. Another possibiliy would be to sync attributes to User Profile (custom attributes like extAttr) and retrieve them in the code ? Do you know if this is possible ? If so, how can I achieve this ?
    – Nico
    Commented Mar 17, 2015 at 12:41
  • I am not sure why you think you cannot read AD properties. Reading profile properties is also feasible. But going by the suggestion of config list I gave in my answer, the first time you query for a user, no result will be returned which means user has to visit both pages. Now user goes to disclaimer page and accepts the disclaimer, an entry for the user will be created and corresponding field updated. User moves to password change, if password is changed another field is updated. Commented Mar 17, 2015 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.