#!/usr/bin/env php [--agent]\n"; die(1); } $username = $argv[1]; $realname = $argv[2]; $email = $argv[3]; $user = id(new PhabricatorUser())->loadOneWhere( 'userName = %s', $username); if ($user) { echo "User already exists!\n"; die(1); } $user = new PhabricatorUser(); $user->setUserName($username); $user->setRealName($realname); $user->setEmail($email); if (isset($argv[4]) && $argv[4] == '--agent') { $user->setIsSystemAgent(true); } $user->save(); echo "Created user.\n";