1
krayc
How to get an email when a user has activated their accout???
  • 2004/3/10 14:08

  • krayc

  • Not too shy to talk

  • Posts: 107

  • Since: 2004/2/17


I'm sure it's possible but has anyone done this already and can share a "how-to" and the code on how to do it?

krayc

2
phppp
Re: How to get an email when a user has activated their accout???
  • 2004/3/10 14:38

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


user.php

LINE #129
} else {

// hack by phppp
$xoopsMailer =& getMailer();
$xoopsMailer->useMail();
$xoopsMailer->setTemplate('activated.tpl');
$xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
$xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
$xoopsMailer->assign('SITEURL', XOOPS_URL."/");
$xoopsMailer->setToUsers($thisuser);
$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
$xoopsMailer->setFromName($xoopsConfig['sitename']);
$xoopsMailer->setSubject(sprintf(_US_YOURACCOUNT,$xoopsConfig['sitename']));
$xoopsMailer->send();
// hack by phppp

redirect_header('user.php',5,_US_ACTLOGIN);
}

3
krayc
Re: How to get an email when a user has activated their accout???
  • 2004/3/10 15:52

  • krayc

  • Not too shy to talk

  • Posts: 107

  • Since: 2004/2/17


phppp, i did that hack to user.php.

Let me clarify. I downloaded it, copied and pasted your hack text (using PHPEdit) . saved it. uploaded it.

Saving the original. :)

But when I log in, i get a blank screen.

So first... did I edit the right file?
Second. is there something else I need to do?

krc

4
phppp
Re: How to get an email when a user has activated their accout???
  • 2004/3/10 16:09

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


The root user.php file?
Only the red part?

That's what I did.

5
phppp
Re: How to get an email when a user has activated their accout???
  • 2004/3/10 16:13

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


forget one item

xoops 2.06?

6
krayc
Re: How to get an email when a user has activated their accout???
  • 2004/3/10 17:31

  • krayc

  • Not too shy to talk

  • Posts: 107

  • Since: 2004/2/17


2.05 is what im testing it on.

I haven't had the nerve to upgrade my site yet until I can figure out how to copy it.

krayc

7
krayc
Re: How to get an email when a user has activated their accout???
  • 2004/3/10 20:55

  • krayc

  • Not too shy to talk

  • Posts: 107

  • Since: 2004/2/17


Ok, I upgraded to .06... it now works.

A refinement? How do I also send a copy to the admin of the site?


by the way thanks for that code. just what I needed.


krayc

Login

Who's Online

133 user(s) are online (78 user(s) are browsing Support Forums)


Members: 0


Guests: 133


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits