Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15434461
D7678.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7678.id.diff
View Options
Index: scripts/user/account_admin.php
===================================================================
--- scripts/user/account_admin.php
+++ scripts/user/account_admin.php
@@ -4,6 +4,29 @@
$root = dirname(dirname(dirname(__FILE__)));
require_once $root.'/scripts/__init_script__.php';
+$table = new PhabricatorUser();
+$any_user = queryfx_one(
+ $table->establishConnection('r'),
+ 'SELECT * FROM %T LIMIT 1',
+ $table->getTableName());
+$is_first_user = (!$any_user);
+
+if ($is_first_user) {
+ echo pht(
+ "WARNING\n\n".
+ "You're about to create the first account on this install. Normally, you ".
+ "should use the web interface to create the first account, not this ".
+ "script.\n\n".
+ "If you use the web interface, it will drop you into a nice UI workflow ".
+ "which gives you more help setting up your install. If you create an ".
+ "account with this script instead, you will skip the setup help and you ".
+ "will not be able to access it later.");
+ if (!phutil_console_confirm(pht("Skip easy setup and create account?"))) {
+ echo pht("Cancelled.")."\n";
+ exit(1);
+ }
+}
+
echo "Enter a username to create a new account or edit an existing account.";
$username = phutil_console_prompt("Enter a username:");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 26, 3:50 AM (5 d, 18 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7704452
Default Alt Text
D7678.id.diff (1 KB)
Attached To
Mode
D7678: Warn users about using `bin/accountadmin` for first time setup
Attached
Detach File
Event Timeline
Log In to Comment