CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Include Drupal username and password in CiviCRM email receipt?
Pages: [1]

Author Topic: Include Drupal username and password in CiviCRM email receipt?  (Read 2085 times)

mikael.andersson@charity.se

  • Guest
Include Drupal username and password in CiviCRM email receipt?
October 22, 2009, 07:46:10 am
As it is right now, two emails are sent on a membership signup. However, I only want one email to be sent. How do I include the username, the password and the URLs of the Drupal email in the CiviCRM email receipt?

Thanks,

Mikael

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Include Drupal username and password in CiviCRM email receipt?
October 26, 2009, 03:01:30 am
Hey,

I don't think it's easily possible - you would probably need to assemble some custom code to grab the receipt info from CiviCRM and send it along with Drupal registration email.

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Include Drupal username and password in CiviCRM email receipt?
October 26, 2009, 03:55:36 am
Pretty sure Michał is that it's not easily possible to send out a regular password reminder. Drupal goes to some efforts to make sure it doesn't know what your user's passwords are. Drupal can check if they gave the right password, but the passwords aren't stored in a readable format so you can't readily email them out.

(I respect that you may have a good reason for doing this, but do consider whether seeing their SECRET PASSWORD in a plaintext email will give your users the screaming heebie-jeebies. Your users may thank you to avoid this entirely, even if you do find a method!)

Methods to achieve the same ends depend if you need them logged in as a Drupal user also, or just as a CiviCRM contact (which limits their authenticated activities to CiviCRM data), or if you really really do need to send their password in an email.

For a CiviCRM "Click here to (do X)" then you can also skip the login entirely by using {contact.checksum} in your CiviMail message. That way you get them authenticated as a CiviCRM user only, not a Drupal user, but you can do all your fundraising, address update, survey stuff OK still. They will be recognised as CiviCRM contacts but not as Drupal users with this method.

For a Drupal login, you could look into user_pass_reset_url($account) which is the Drupal user.module function to generate a nice clickable URL to log the user in and let them reset their password. Or you can just link them to example.com/user/password to self-serve a login reset email if they actually want one.

CiviCRM's method is better for working with the general public, Drupal's is really intended for when you actually NEED a password reminder.

(Wondering now if there's a Drupal module to generate a login-and-redirect URL, that might be a handy method to get best of both worlds. Mmm.)

If you really wanted to email out passwords every month, you'd need to roll your own method to store Drupal passwords plaintext (either in the users table or elsewhere), which would be A Very Bad Idea, even though it'd be quite easy to do.
@xurizaemon ● www.fuzion.co.nz

kurosevic

  • I’m new here
  • *
  • Posts: 25
  • Karma: 1
Re: Include Drupal username and password in CiviCRM email receipt?
April 08, 2010, 08:06:53 am
as i know of, there are two ways to redirect upon login:
1. http://drupal.org/project/path_redirect using this module
2. using the rules module: if logged in then redirect to url.

and a bonus 3. possibly using the triggers module.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Include Drupal username and password in CiviCRM email receipt?

This forum was archived on 2017-11-26.