Hi. I was trying to modify by extension the default value of the send_invite boolean field in the User Plugin. I was able to set it to false like this:
use RainLab\User\Models\User as UserModel;
use RainLab\User\Controllers\Users as UsersController;
// in a plugin boot function:
UsersController::extendFormFields(function($form,$model,$context){
if(!$model instanceof UserModel){
return;
}
if($context == 'create'){
$model->send_invite = false;
}
});
But I was wondering if there’s a way to modify it’s properties, and not only to change its value directly like this one.