13 if ( !$this->user->getId() ) {
15 "email" =>
"test@example.com",
16 "real_name" =>
"Test User" ] );
20 if ( $group !==
'' ) {
21 $this->user->addGroup( $group );
23 $this->user->saveSettings();
static setPasswordForUser(User $user, $password)
Set the password on a testing user.
__construct( $userName, $password, $group='')
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
static createNew( $name, $params=[])
Add a user to the database, return the user object.