Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mat R 5 posts 25 karma points
    Dec 09, 2009 @ 22:36
    Mat R
    0

    Email new member when created in the back-office

    I need to send an email to new members created in the back office. The email will inform the member of their username and password. How would I go about doing this?

    Thanks!!

    Mat

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Dec 09, 2009 @ 23:33
    Dirk De Grave
    0

    Mat,

    Events get fired when new members are created, but it doesn't hold any member info when the event is being fired. Close to useless at that point (here's the work item on Codeplex). Maybe you could rely on other events being fired (eg. on save) and inform the member of their username and password.

    An overview of events and how to register for events can be found on the wiki pages starting here.

    Cheers,

    /Dirk

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Dec 10, 2009 @ 09:02
    Richard Soeteman
    0

    Don't think the save event will work, when the password is encrypted (which is default now) it will only show the encrypted password. A workaround will be  to create a custom usercontrol containing the asp.net createuser control. Then in the CreateUser event read the username and password and use that to send the email.

    Cheers,

    Richard

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Dec 10, 2009 @ 09:27
    Niels Hartvig
    0

    Good news - a new event was introduced in 4.0.3 to support this (that's why it's so important that you give us feedback, you see ;-)).

    public class MemberTest : umbraco.BusinessLogic.ApplicationBase {
      public MemberTest() {
          umbraco.memberTasks.NewMember += new umbraco.memberTasks.NewUIMemberEventHandler(memberTasks_NewMember);
      }

       void memberTasks_NewMember(umbraco.cms.businesslogic.member.Member sender, string unencryptedPassword, umbraco.NewMemberUIEventArgs e) {
        umbraco.BusinessLogic.Log.Add(LogTypes.Debug, User.GetUser(0), -1, "Ping from new member: " + sender.Password + ", " + unencryptedPassword);
           }
    }

    :)

    Niels

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Dec 10, 2009 @ 10:02
    Richard Soeteman
    0

    Hi Niels,

    Greate I should have read the changelog  for 4.0.3 I'll update the wiki for events later and thanks for sharing an example for the Event examples wiki....

    Cheers,

    Richard

  • saif 68 posts 88 karma points
    Apr 20, 2012 @ 18:32
    saif
    0

    Hi All,

    Neils Hartvig mentioned  on follwoing link

    our.umbraco.org/.../5798-Email-new-member-when-created-in-the-back-office

    how to fetch newly created user's "user name" and "password" and send the user an email with these details.

    I created same class in App_Code and created a new user in the back office and nothing happend.

    Please any one can direct me how to use this class and how this class will be called.

    any help would be really appreciated.

Please Sign in or register to post replies

Write your reply to:

Draft