changing login address on activation email

Permalink
Hi

I am using a login block on my site where members log in - there is also an option to register there.

All is working well, but when the admin manually activates the new accounts the user is sent an email telling them their account has been activated and giving a link to the normal login page - in my case its as below. Is there any way I can change the link so it points to the page where the login block is situated - iehttp://www.accringtongolfclub.com/index.php/member-login/...

I have searched through the site and cant find where i can alter this.. any help as always would be appreciated..

Ian

---------------------------------------------------------------------------

Welcome to Accrington Golf Club

Your registration has been approved. You can log into your new account here:

http://www.accringtongolfclub.com/index.php/login/...

 
mnakalay replied on at Permalink Reply
mnakalay
Hello,
It's actually a little more complicated than it seems.
What happens is that the link included in the email contains a piece of data that is required to indentify the user and validate his registration. When he clicks on the link he is taken to the login page where a function is called and the user validated.

You would need to do 2 things:
1-Modify the email message generated with the link
2-Include the validating function in your page's controller.

For first one you need an override.

The email can be found in ROOT/concrete/mail/validate_user_email.php

you need to modify the line
View::url('/login', 'v', $uHash)

to use your page url. Modify only the '/login' page.

Then you need to add the following code to your page's controller
// responsible for validating a user's email address
   public function v($hash = '') {
      $ui = UserInfo::getByValidationHash($hash);
      if (is_object($ui)) {
         $ui->markValidated();
         $this->set('uEmail', $ui->getUserEmail());
         $this->set('validated', true);
      }
   }
ian999 replied on at Permalink Reply


Sent from my iPhone

> Thank you for taking the time to answer

The email i was trying to alter was the pne sent after manual activation but once you pointed me to the email folder i was able to find the file i needed and have sorted it out

Thanks once again