Skip to content

adduser CLI command fails on upgrade to 4.2 #38543

@jhrenshaw

Description

@jhrenshaw

Steps to reproduce the issue

go to CLI directory
php joomla.php user:adduser --username=me --name="My Name" --email=valid_email_address --password="my password" --usergroup=Registered

Expected result

user is added to the user table

Actual result

user is not added to the user table

the return value of $userObj->getError() is something like

'the field otpKey does not have a default value'

There is a similar issue if the field 'otep' is not given a default value

System information (as much as possible)

Additional comments

I think you just need to add

$user['otpKey'] = '';
$user['otep'] = '';

after line 148 in the addUserCommand.php file

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions