Activate link from member profile page

Started by eldublu, December 17, 2012, 03:00:08 PM

Previous topic - Next topic

eldublu

If we try to activate a member from the link in their profile instead of from the admin awaiting activation screen then the email notification that their account has been activated is not sent, if it's done from the activation screen then it works.
How can I modify this to make the 'activate' link send the email?

Thanks in advance

Oldiesmann

Sources/Profile.php

Find
// Make sure we update the stats too.

Add before that
require_once($sourcedir . '/Subs-Post.php');

sendmail($member['email'], $txt['register_subject'],
"$txt[hello_guest] $member[name]!\n\n" .
"$txt[admin_approve_accept_desc] $txt[719] $member[username]\n\n" .
"$txt[701]\n" .
"$scripturl?action=profile\n\n" .
$txt[130]);


The only problem with this is that we have no way of knowing the user's language at this point, so the email will be sent out in the default forum language. If you don't allow users to change their language (or at least not on registration), this won't be an issue.
Michael Eshom
Christian Metal Fans

MorozAlex

#2
Thankx for your help, very appreciated!
__________________________________________________________________
greenavis.com
-Alex Koz

eldublu

Thanks for your reply, I have tried the code and the email is not being sent.


Advertisement: