I'm trying to set the links in generic comment email notifications to forward the recipient to their profile. In the actions/comments/add i'm seeing this:
// notify if poster wasn't owner
if ($entity->owner_guid != $user->guid) {
notify_user($entity->owner_guid,
$user->guid,
elgg_echo('generic_comment:email:subject'),
sprintf(
elgg_echo('generic_comment:email:body'),
$entity->title,
$user->name,
$comment_text,
$entity->getURL(),
$user->name,
$user->getURL()
Instead of the entity being returned, i want that link to direct the user to their profile page instead of the entity url. Do i need to replace $entity->getURL(), with $page_owner?
everything i've tried is not working...???
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Cash@costelloc
Cash - 0 likes
- triout@triout
triout - 0 likes
You must log in to post replies.No, you want to use the owner of the entity. $entity->getOwner()
Oi! of course! a little tired when i was working on this...thanks Cash.
Just a side note for anyone interested in what i've been doing with this-I did a little change with what i'm mentioning above, I replaced $entity->getURL(), with $_SERVER['HTTP_REFERER'] to direct the user to the page of the content being referenced in the notification...so if it was a post let's say on the user's profile river(using river_comments) then the link will direct them to their profile, if posted on an image(using tidypics) then it will direct them to the image location.
Hope this helps anyone in need. : )