• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 Override User Signature dynamically

#1
If specific requirements are met, I would like to change (override) the signature output for a user (both, profile and postings - viewable for members and guests as well).

Where should I start? When I search the /src/XF folder for "signature" I find a lot of files, but most of them are associated with saving and validating the signature.
 
#2
I tried now a code event listener:

Listen to event: entity_defaults

Event hint: XF\Entity\UserProfile

And my listener class:

PHP:
class Listener
{
    public static function setUserSignature(Entity $entity)
    {
        $entity->signature = "TEST";

        return $entity;
    }
}
Does not have any effect.