This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

info15011
info15011

Hello I'm using the Rainlab User plugin.

How can | override a component function? I saw one Answer but i didnt know where to put the code. Lets say i want to override onRegister function.

How can i do this?

judeudemolidor
judeudemolidor

info15011 said:

Hello I'm using the Rainlab User plugin.

How can | override a component function? I saw one Answer but i didnt know where to put the code. Lets say i want to override onRegister function.

How can i do this?

i want too

simboonlong
simboonlong

Hi there,

It is in the documentation. Please check. https://github.com/rainlab/user-plugin#overriding-functionality

On the top of the page, do this:

<?php function onRegister() { // your code here } ?>

This should overwrite the component's innate function.

Regards Boon

Last updated

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.