Extendig SqlMembershipprovider

Discussion in 'ASP .Net Security' started by ManniAT, May 15, 2005.

  1. ManniAT

    ManniAT Guest

    Hi,

    SqlMembershipProvider does (allmost) what I want.
    So I'm not willing to write my own provider.

    But I want to change some little things.
    a.) I want to be able to add an "Email-OptIn feature"
    so the user should get an email with a link "Click here to activate your account"
    b.) I want enhance the above thing to a "Managed OptIn Feature"
    so the email goes first to an admin
    he either chooses to negotiate or to accept the user by redirecting the mail to him

    Until the user didn't click on that "verification link" the account should not be able to login.

    Can this be done without writing my own provider, and using the existing controls?

    Cheers

    Manfred
    ManniAT, May 15, 2005
    #1
    1. Advertising

  2. ManniAT

    Brock Allen Guest

    > a.) I want to be able to add an "Email-OptIn feature"
    > so the user should get an email with a link "Click here to activate
    > your account"


    So you can set the DisableCreatedUser=true for your CreateUserWizard control.
    This way when the user account si crated, it's initially diasbled. Also handle
    the CreatedUser event to send an email with the link or URL they must click
    to activate the account.

    > b.) I want enhance the above thing to a "Managed OptIn Feature"
    > so the email goes first to an admin
    > he either chooses to negotiate or to accept the user by redirecting
    > the mail to him
    > Until the user didn't click on that "verification link" the account
    > should not be able to login.


    Again, this is just logic in your Createduser event that decided who to send
    the email to and updates your workflow as appropriate.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen
    Brock Allen, May 18, 2005
    #2
    1. Advertising

  3. ManniAT

    ManniAT Guest

    Hi Brock,

    thank you for your reply. I solved it 2 days ago in the way you suggested.
    Maybe anybody else will also have such a "problem" so I will tell a short how to.
    After digging in the things I found that it is pretty easy to to such a thing.

    I tell the wizard not to activate the user (as you wrote).
    I handle the "CreatedUser" event. There I made a GUID and use a part of if as
    some kind of "activaton string". I store this in User.Comment.
    And I send a mail to the user.with a link to the activation page.
    Furtheron I solved another thing here - a "default role membership".

    Than I made a page ("ActivateUser") where I load the user, check if
    the passsed "ID" fits the comment - and if so I set User.IsApproved to true.

    The only tricky thing (I found no other way than this) is to have an email after
    resetting the password. Since the PWD is not readable I could only parse it somehow
    from the e.Message.body in the "SendingMail" event. This seems a little unsave,
    since the format of the message can change.
    So I do another ResetPWD to get the new for my mail message.
    With that approach I have also the ability to enforce another "activation" step again.

    The things were pretty easy - after finding out where to intercept the system :)

    Cheers

    Manfred
    ManniAT, May 18, 2005
    #3
  4. ManniAT

    v Guest

    Hi Manniat,

    I saw a post you had about the createuserwizard. I was wondering whether you
    would be able to help me, I am using the createuserwizard, but I want to be
    able to let users register and then they are sent an email with a link to
    activate their account, do you know how this can be done? I am new to asp.
    net and therefore would really appreciate your help.

    Thanks

    V
    v, Aug 17, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ibiza
    Replies:
    0
    Views:
    441
    ibiza
    Jan 24, 2006
  2. Replies:
    3
    Views:
    534
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Mar 5, 2006
  3. Sergio E.
    Replies:
    4
    Views:
    350
    Sergio E.
    Aug 10, 2007
  4. Sergio E.
    Replies:
    4
    Views:
    782
    Sergio E.
    Aug 10, 2007
  5. An Onymous
    Replies:
    5
    Views:
    150
    An Onymous
    Oct 20, 2007
Loading...

Share This Page