diff options
| author | 2016-10-24 01:41:09 +0200 | |
|---|---|---|
| committer | 2016-10-24 01:41:09 +0200 | |
| commit | ab4ece6780cf841f6ce4e89f7b81a1ff1661f615 (patch) | |
| tree | 61b7f383d2d9749bc19e4154dcb0407f88785314 /cli/create-user.php | |
| parent | 1f03e8a3aec8ff4b7bbba45bc3fd14a0552c2bc4 (diff) | |
CLI do-install
https://github.com/FreshRSS/FreshRSS/issues/1095
https://github.com/FreshRSS/FreshRSS/issues/1090
Diffstat (limited to 'cli/create-user.php')
| -rwxr-xr-x | cli/create-user.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cli/create-user.php b/cli/create-user.php index 243e65a35..5e93d4605 100755 --- a/cli/create-user.php +++ b/cli/create-user.php @@ -12,8 +12,8 @@ $options = getopt('', array( )); if (empty($options['user'])) { - fail('Usage: ' . basename(__FILE__) . " --user username --password 'password' --api-password 'api_password'" . - " --language en --email user@example.net --token 'longRandomString'"); + fail('Usage: ' . basename(__FILE__) . " --user username ( --password 'password' --api-password 'api_password'" . + " --language en --email user@example.net --token 'longRandomString' )"); } $username = $options['user']; if (!ctype_alnum($username)) { @@ -35,6 +35,12 @@ $ok = FreshRSS_user_Controller::createUser($username, 'token' => empty($options['token']) ? '' : $options['token'], )); +if (!$ok) { + fail('FreshRSS could not create user!'); +} + invalidateHttpCache(FreshRSS_Context::$system_conf->default_user); +accessRights(); + done($ok); |
