XF 2.0 Override User Signature dynamically

nocte

Well-known member
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.
 
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.
 
Back
Top Bottom