mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-04-27 17:58:52 -04:00
CLI option no-default-feeds
https://github.com/FreshRSS/FreshRSS/issues/1095
This commit is contained in:
@@ -9,11 +9,12 @@ $options = getopt('', array(
|
||||
'language:',
|
||||
'email:',
|
||||
'token:',
|
||||
'no-default-feeds',
|
||||
));
|
||||
|
||||
if (empty($options['user'])) {
|
||||
fail('Usage: ' . basename(__FILE__) . " --user username ( --password 'password' --api-password 'api_password'" .
|
||||
" --language en --email user@example.net --token 'longRandomString' )");
|
||||
" --language en --email user@example.net --token 'longRandomString --no-default-feeds' )");
|
||||
}
|
||||
$username = $options['user'];
|
||||
if (!ctype_alnum($username)) {
|
||||
@@ -33,7 +34,9 @@ $ok = FreshRSS_user_Controller::createUser($username,
|
||||
array(
|
||||
'language' => empty($options['language']) ? '' : $options['language'],
|
||||
'token' => empty($options['token']) ? '' : $options['token'],
|
||||
));
|
||||
),
|
||||
!isset($options['no-default-feeds'])
|
||||
);
|
||||
|
||||
if (!$ok) {
|
||||
fail('FreshRSS could not create user!');
|
||||
|
||||
Reference in New Issue
Block a user