Skip to content

Commit f7939be

Browse files
committed
Added user name
1 parent b329a1f commit f7939be

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/JoomlaBrowser.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,8 @@ public function createCategory($title, $extension = '')
12291229
/**
12301230
* Create a user in the administrator site
12311231
*
1232-
* @param string $username User name
1232+
* @param string $name Name
1233+
* @param string $username User name (login)
12331234
* @param string $password Password
12341235
* @param string $email Email
12351236
* @param string $userGroup Group id to attach to the user
@@ -1239,7 +1240,7 @@ public function createCategory($title, $extension = '')
12391240
* @since 3.8.11
12401241
* @throws \Exception
12411242
*/
1242-
public function createUser($username, $password, $email, $userGroup = 'Super Users')
1243+
public function createUser($name, $username, $password, $email, $userGroup = 'Super Users')
12431244
{
12441245
$this->debug('User creation');
12451246
$this->doAdministratorLogin();
@@ -1254,7 +1255,8 @@ public function createUser($username, $password, $email, $userGroup = 'Super Use
12541255

12551256
$this->checkForPhpNoticesOrWarnings();
12561257
$this->debug('I fill up the new user information');
1257-
$this->fillField(array('id' => 'jform_name'), $username);
1258+
$this->fillField(array('id' => 'jform_name'), $name);
1259+
$this->fillField(array('id' => 'jform_username'), $username);
12581260
$this->fillField(array('id' => 'jform_password'), $password);
12591261
$this->fillField(array('id' => 'jform_password2'), $password);
12601262
$this->fillField(array('id' => 'jform_email'), $email);

0 commit comments

Comments
 (0)