12 $this->user = User::newFromName( $this->userName );
13 if ( !$this->user->getId() ) {
14 $this->user = User::createNew( $this->userName, [
15 "email" =>
"test@example.com",
16 "real_name" =>
"Test User" ] );
20 if ( $group !==
'' ) {
21 $this->user->addGroup( $group );
23 $this->user->saveSettings();