Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 protected function performCreate($user, array $attributes)
 {
     // set the username manually as it is not fillable
     $user->username = $attributes['username'];
     // set a default user level if not set already
     if (!$user->user_level) {
         $user->user_level = 1;
     }
     return parent::performCreate($user, $attributes);
 }