aboutsummaryrefslogtreecommitdiff
path: root/cli/update-user.php
AgeCommit message (Collapse)Author
2024-02-28Command Line Parser Concept (#6099)Gravatar Kasimir Cash
* Adds logic for validation * Adds validation to do-install * Adds help to do-install * Adds validation & help to reconfigure * Adds validation to check.translation * Adds validation to manipulate.translation * Small fixes to help texts * Refactors language option validation * Adds default options to validation * Fixes validation with regex * Refactors readAs functions * Updates to new regex validation format * Fixes typing around default values * Adds file extension validation * Restandardises validation & parsing typing around array of strings * Adds NotOneOf validation * Adds ArrayOfString read as * Refactors existing validation * Adds validation throughout cli * Removes unused file * Adds new CL parser with goal of wrapping CLI behaviour * Hides parsing and validation * Rewites CL parser to make better use of classes * Rolls out new parser across CL * Fixes error during unknown option check * Fixes misnamed property calls * Seperates validations into more appropriate locations * Adds common boolean forms to validation * Moves CommandLineParser and Option classes into their own files * Fixes error when validating Int type * Rewrites appendTypedValues -> appendTypedValidValues now filters invalid values from output * Renames -> for clarity * Adds some docs clarifying option defaults and value taking behaviour * Refactors getUsageMessage for readability * Minor formatting changes * Adds tests for CommandLineParser * Adds more tests * Adds minor fixs * Reconfigure now correctly updates config * More fixes to reconfigure * Fixes required files for CommandLineParserTest * Use .php extension for PHP file * PHPStan ignore instead of wrong typing * Refactors to support php 7.4 * Moves away from dynamic properties by adding 'Definintions' to all commands * Renames target to definition for clarity * Stops null from being returned as a valid value in a certain edge case * Adds PHPStan ignore instead of incorrect typing * Refactors tests to take account of new typing solution * Marks file as executable * Draft CLI rework * Finish rewrite as object-oriented * Fix PHPStan ignore and make more strongly typed * Rename class Option to CliOption * Light renaming + anonymous classes --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-01-092297 cli parameters consistency (#6028)Gravatar Kasimir Cash
* Updates do-install params * Adds parseCliParams to _cli.php * Updates do-install to use parseCliParams * Updates reconfigure to use parseCliParams * Fixes bug mail_login => email * Update create-user to use parseCliParams * Minor refactor * Updates update-user to use parseCliParams * Fix no_default_feeds => no-default-feeds * Refactors arrays * Updates CLI Readme * Adds docblocks to _cli functions * Sets vars in _cli functions * Fixes indentation * Meeting coding standards around colons * Meeting PHPStan standards * Removes stray whitespace * Meeting PHPStan Next Level standards * More specific typing * Maintaining types * Typing around getopt() * Fixes typo * Fixes typo perameters -> parameters * Removes unused variable * Rewrites deprecation warning message
2023-11-16Use strict_types (#5830)Gravatar Luc SANCHEZ
* Little's optimisations and booleans in conditions * Apply strict type * Apply strict type * Apply strict type * Fix multiple bugs with PHP 8.2 and 8.3 * Many declares missing, more errors fixed * Apply strict type * Another approach * Stronger typing for Minz_Session * Fix case of SQLite --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-12-31Add PHPStan (#4021)Gravatar Alexandre Alapetite
* Add PHPStan #fix https://github.com/FreshRSS/FreshRSS/issues/4016 https://phpstan.org/ ```sh composer run-script phpstan ``` * More fixes * Fix global variables * Add .phtml * Fix merge https://github.com/FreshRSS/FreshRSS/pull/4090 * Fix more warnings * Fix view errors and enable in CI * ReturnTypeWillChange * Dynamic view type * Fix Minz static/self bug
2020-09-17Fix CLI api_password (#3179)Gravatar Alexandre Alapetite
* Fix CLI api_password #fix https://github.com/FreshRSS/FreshRSS/issues/3177 Fix regression from https://github.com/FreshRSS/FreshRSS/pull/2675 * Update cli/_update-or-create-user.php Co-authored-by: oupala <oupala@users.noreply.github.com> Co-authored-by: oupala <oupala@users.noreply.github.com>
2020-06-06Modify shebang to be more portable (#3038)Gravatar Alexis Degrugillier
The new shebang is a portable way to find the php interpreter. It works on Mac, GNU/Linux and BSD.
2019-12-03Separate the update API password endpoint (#2675)Gravatar Marien Fressinaud
* Extract hashPassword method from userController * Extract and refactor fever key-related methods * Move update of API password to dedicated action * Simplify the controller by refactoring feverUtil * Add locales
2019-08-29Provide email address verification feature (#2481)Gravatar Marien Fressinaud
* Add an email field to the profile page I reuse the `mail_login` from the configuration. I'm not sure if it's useful today (I would say it was used when Persona login was available). A good improvement would be to rename `mail_login` into `email` so it would be more intuitive to use. * Add boolean to the conf to force email validation This commit only adds a configuration item. * Add email during registration if email must be validated * Set email token to validate when email changes * Block access to FreshRSS if email is not validated * Send email when address is changed * Allow to resend the validation email * Allow the user to change its email while blocked * Document the email validation feature * fixup! Allow the user to change its email while blocked * tec: Autoload PHPMailer lib * Validate email address format * Add feedback on validation email resend action * Allow to logout when user is blocked * fix: Change default email "from" * Reorganize i18n keys * Complete all the locales with default english * Hide sidebar (profile page) if email is not validated * Check email requirements on registration * Allow admin to specify email when creating users * Don't check email format if value is empty * Remove trailing comma in userController Co-Authored-By: Alexandre Alapetite <alexandre@alapetite.fr> * Set PHPMailer validator to html5 before sending email * fixup! Remove trailing comma in userController
2018-02-14Allow admin user to reset passwords (#1765)Gravatar Alexis Degrugillier
See #960
2017-12-11Use __DIR__ for relative include and requireGravatar Alexandre Alapetite
For uniformity, and to avoid having PHP searching in include_path. http://php.net/manual/function.include.php https://github.com/FreshRSS/FreshRSS/pull/1715 https://github.com/FreshRSS/FreshRSS/pull/1711#issuecomment-350581350
2017-08-05Mutualise create-user and update-userGravatar Alexandre Alapetite
2017-07-23CLI update-user usageGravatar Alexandre Alapetite
2017-07-22updateContextUser typoGravatar Alexandre Alapetite
2017-07-22+x execution rights update-userGravatar Alexandre Alapetite
2017-07-22CLI update userGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/1600 Not tested