We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New comment email notification and 'insert_comment_insert_array' hook

Development and Programming

Razzhivaykin Aleksey's avatar
Razzhivaykin Aleksey
11 posts
11 years ago
Razzhivaykin Aleksey's avatar Razzhivaykin Aleksey

I hame some input fields on my comment form, that I show for non-registered members. They are: ‘name’, ‘email’ and ‘comment text’.

And my task was to add string “Guest” to text user typed in the field ‘name’. So I created extension where I use ‘insert_comment_insert_array’ hook:

public function concat_username($data)
{
    if($data['author_id'] != 0)
        return $data;

    $data['name'] = "Guest ".$data['name'];

    return $data;
}

And it works. But new comment email notifications that I receive after new comment was posted contain user name without my string “Guest”.

May be anyone knows what’s wrong?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.