Monday, September 29, 2008

Re: email with link to mydomain.com

You can also use this:

Router::url(array('controller'=>'users','action'=>'activate',$key),
true);

Note the second parameter, "true", which will make the Router return
the full URL.

Internally, it is using FULL_BASE_URL as teknoid suggested, but I
think it's cleaner to let the Router take care of the proper URL
rather than doing it manually.

On Sep 27, 7:16 pm, donnerbeil <donnerb...@googlemail.com> wrote:
> Hi,
>
> When a user registers on my site, an email with an activation link is
> sent to him. In the email templates I would like to use something like
> echo $html->link('controller'=>'users','action'=>'activate',$key). But
> when this link is shown in the email it links to /users/activate/[key]
>
> How can I tell cakephp, that it has to puthttp://www.mydomain.comin
> front of the url, so that it works when someone clicks on the link in
> the email?
>
> any ideas?
>
> Thanks
>
> Donnerbeil
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: