Admin account creation fails: Call to undefined method PhabricatorUserEditor::makeAdminUser()


#1

Observed Behavior:
When trying and create an admin user, an error related to the missing PhabricatorUserEditor::makeAdminUser() method is thrown. User account is not created.

[2018-12-19 11:08:00] EXCEPTION: (Error) Call to undefined method PhabricatorUserEditor::makeAdminUser() at [/scripts/user/account_admin.php:203]
arcanist(head=master, ref.master=eb732555a71a), phabricator(head=master, ref.master=95ea4f11b94f), phutil(head=master, ref.master=cad1985726c9)
PHP Fatal error: Uncaught Exception: Process exited with an open transaction! The transaction will be implicitly rolled back.

Expected Behavior:
Admin user account should be created without error

Phabricator Version:
phabricator : 95ea4f11b94f7ce9cc26a91423374684e5b8d2bf (Tue, Dec 18)
arcanist : eb732555a71a3a1b15596dd65b6dad3c2e2af90b (Wed, Dec 12)
phutil : cad1985726c99e1225b95abf8a2bd1601a267fe4 (Thu, Dec 13)
diff : 3.5 at /usr/bin/diff
git : 2.11.0 at /usr/bin/git
hg : Not Available
pygmentize : Not Available
svn : 1.9.5 at /usr/bin/svn

Reproduction Steps:
On the fresh install, after the MySQL setup, try and create the admin user via the web GUI. When submitting the form, an error page is shown complaining about “Call to undefined method PhabricatorUserEditor::makeAdminUser()”

Same issue when using the script scripts/user/account_admin.php (bot=N, admin=Y)

Hints:

The method makeAdminUser has been recently removed from PhabricatorUserEditor :
https://github.com/phacility/phabricator/commit/b6999c7ef41dac8699ed07063872ea36ef3390f6#diff-7e2553befaacca317d0ac4d2f889b8b2
This method is still referenced in :

  • scripts/user/account_admin.php
  • src/applications/auth/controller/PhabricatorAuthRegisterController.php

Restoring the makeAdminUser method in PhabricatorUserEditor seems to fix the issue (the admin account is created)


#2

Thanks for the report. https://secure.phabricator.com/D19915 fixes your particular issue, and the other callsites will be fixed shortly.


#3