This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
leocavalcante
Didn't found a doc on how to extend RainLab.User
.
My solution after adding 3 more fields on the register form was:
public function boot()
{
User::extend(function($model) {
$model->bindEvent('model.beforeCreate', function() use ($model) {
$model->street_addr = post('street_addr');
$model->occupation = post('occupation');
$model->reg = post('reg');
});
});
}
Is this right? There is a better way?
1-2 of 2