aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/userController.php
AgeCommit message (Collapse)Author
2019-09-16Configure user defaults (#2490)Gravatar Joris Kinable
* new users inherit defaults from config-user.php * installer creates ./data/config-user.php * fixed typo * .gitignore fix * fixed style issues * Fixed comments * Update according to feedback - rename file into `data/config-user.custom.php` - make it optional (and so, don't copy it during installation) * fixup! Update according to feedback
2019-09-15CLI to export/import any database to/from SQLite (#2496)Gravatar Alexandre Alapetite
* CLI to export/import any database to/from SQLite Require PHP 5.5+ https://github.com/FreshRSS/FreshRSS/pull/2495 * Travis * Execution rights * Fix wrong static fields * Fix MySQL bad default buffering https://stackoverflow.com/questions/6895098/pdo-mysql-memory-consumption-with-large-result-set/6935271#6935271 https://php.net/manual/ref.pdo-mysql * Fix count on progression * Avoid static DB information To ease working with two DBs at the same time * Less static, simplify Needs some testing * Small corrections * Special case for SQLite to SQLite * Modify special case for SQLite * Remove special case for SQLite More uniform logic for the 3 databases. Fix wrong DROP TABLE for SQLite. * Drop indexes * Revert "Drop indexes" This reverts commit f28d2bae0935745c1c74ea38f2ee083f3fd4bf9d. * Fix deletion * Fix classic export * Update cli/README.md Co-Authored-By: Marien Fressinaud <dev@marienfressinaud.fr> * Addressing part of review * Remove goto :cry: * Travis * Comment for SQLite case * Fix missing fields when inserting
2019-08-29fix: Fix "validate email"-related issues (#2512)Gravatar Marien Fressinaud
* fix: Make sure $disable_aside is initialized There was a warning for an uninitialized variable, hidden in production but visible in development mode. * fix: Allow to delete account when email isn't validated
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
2019-08-20Require PHP 5.5+ (#2495)Gravatar Alexandre Alapetite
* Require PHP 5.5+ https://github.com/FreshRSS/FreshRSS/issues/2469#issuecomment-522255093 I think it would be reasonable to require PHP 5.5+ for the core of FreshRSS after all. As Frenzie said, WordPress currently requires PHP 5.6.20+, and it is the most popular PHP application. We would loose about 20% of the PHP servers according to https://w3techs.com/technologies/details/pl-php/5/all but I expect this number to drop fast after the release of CentOS 8 (CentOS accounts for 17% of Linux servers https://w3techs.com/technologies/details/os-linux/all/all ). Distributions: * no impact on Ubuntu, Fedora, Alpine, OpenWRT, FreeBSD, OpenSuze, Mageia, as all active versions have PHP > 7 * no impact on OpenSuze, Synology, as all active versions have PHP > 5.5 * we drop Debian 8 Jessie (-2020) - we keep supporting Debian 9 Stretch (2017-06) - current is Debian 10 Buster * we drop Red Hat 7 (-2024) - we keep supporting RHEL 8 (2019-05) * we drop CentOS 7 (-2024) - we will support CentOS 8 (to be released soonish) When dropping older versions, I can better like when it is for a good reason, and there is actually one with PHP 5.5, namely generators (yield) https://php.net/language.generators.overview which I consider using. * Version note for JSON.php * hex2bin * Update .travis.yml Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>
2019-07-31Clean access checks on userController (#2471)Gravatar Marien Fressinaud
The access was checked several times in some actions and had incoherent behaviours. Also, the `firstAction` condition was a bit tricky to understand. This PR duplicates conditions across all the controller actions and remove the `firstAction` which becomes useless.
2019-06-16Allow email as username (#2407)Gravatar Alexis Degrugillier
* Allow email as username Before, it was possible to register email as username on cli but not in the interface. This was caused by a bug in the pattern which was not working as expected. If your input was "user@example.com", the PHP verification was catching only "user" and was acting like the whole thing was catched. But on the interface, the catching was unsuccesful. Now, the catching should be working properly. I needed to add "$|^" in the pattern because without, I was catching either the beginning of a string either the last char. This was introduced as a workaround for IE/Edge pattern matching on April 27, 2017. See #1511 for more information. I tested it only on FF. Tests on other browsers wanted. See #2391 * Relax and fix username check Allow @ + - * Remove + for now https://github.com/FreshRSS/FreshRSS/pull/2407#issuecomment-502469137
2019-03-22Rework CSRF interaction with sessions (#2290)Gravatar Alexandre Alapetite
* Rework CSRF interaction with sessions Fix https://github.com/FreshRSS/FreshRSS/issues/2288 Improve security in some edge cases Maybe relevant for https://github.com/FreshRSS/FreshRSS/issues/2125#issuecomment-474992671 * Forgotten mime type
2019-02-13Less jQuery (#2234)Gravatar Alexandre Alapetite
* Less jQuery Follow-up of https://github.com/FreshRSS/FreshRSS/pull/2199 * Even less jQuery + global view unread title fix * Even less jQuery * Yet even less jQuery * Even less jQuery * Reduce some events * Even less jQuery * jQuery gone from main view +Fixed English i18n * Fix feed folded view * Remove Firefox 64 workaround Remove workaround for Gecko bug 1514498 in Firefox 64, fixed in Firefox 65 * Split to extra.js Avoid loading unneeded JavaScript code for the main view. + several adjustements * Improve CSS transition fold category * Rewrite shortcuts Remove library. Much faster, shorter, one listener instead of many. Control of the shortcut context. Fix https://github.com/FreshRSS/FreshRSS/issues/2215 * Remove debug * Minor syntax * Filter out unwanted shortcut modifiers * Menu overflow fix * Typo * Fix unfolding in mobile view * Remove jQuery from category.js * Remove jQuery from Global view
2018-10-24Allow dot in username (#2062)Gravatar Alexandre Alapetite
* Allow dot in username https://github.com/FreshRSS/FreshRSS/issues/2061 * Missing quotes for special chars in PostgreSQL
2018-10-21Improved flow for password change (#2057)Gravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/2056
2018-10-14Fix MySQL create table feeds (#2047)Gravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/2042
2018-06-18[#1928] Login user automatically after creation (#1941)Gravatar Marien Fressinaud
2018-05-26Fix CLI for creating/deleting user with Fever API (#1896)Gravatar Alexandre Alapetite
* Fix CLI for creating user with Fever API https://github.com/FreshRSS/FreshRSS/pull/1836 * Fix CLI for deleting user with Fever API https://github.com/FreshRSS/FreshRSS/pull/1836
2018-05-24Add Fever API and user documentation (#1836)Gravatar Kevin Papst
* added fever api and documentation * spaces to tabs * fixed code format * added links * added utf8 to header * removed XML support * removed before check, as we have to convert it afterwards * added sandboxed setting (currently disabled) added support for extensions using entry_before_display * listFeedsOrderUpdate LIMIT https://github.com/FreshRSS/FreshRSS/pull/1836/files#r175287881 * removed custom sql by using FreshRSS_FeedDAO::listFeedsOrderUpdate() * fixed mark all as read * replaced custom sql for getUnread() and getStarred() with dao functions * removed sanitization functions * Rework fever login * Fix config bug Plus documentation * Fix array syntax For compatibility with PHP 5.3 * Disable cookies and session for API * Fix currentUser * added response header and error log * adjusted phpdoc to match new authentication * Mechanism to delete old keys * replace PHP_INT_MAX with zero to disable limit * replace method_exists with check for explicit methods * removed Press support and smaller refactoring + updated docu * Rewrite bindParamArray Avoid one of the SQL injection risks * Docs and readme * Fix API link * Simplify reverse key check Using userConfig
2018-04-06fix update user for empty username (#1857)Gravatar Kevin Papst
2018-02-14Fix notice when managing user (#1785)Gravatar Alexis Degrugillier
See #1765 & #960
2018-02-14Allow admin user to reset passwords (#1765)Gravatar Alexis Degrugillier
See #960
2017-10-12CLI optimize database (#1663)Gravatar Alexandre Alapetite
CLI optimize database https://github.com/FreshRSS/FreshRSS/issues/1583 And VACUUM in SQLite https://github.com/FreshRSS/FreshRSS/issues/918 Add VACUUM for PostgreSQL (Not tested yet)
2017-07-22CLI update userGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/1600 Not tested
2017-04-27Work around for IE / Edge pattern bugGravatar Alexandre Alapetite
Swap order of regex alternatives https://github.com/FreshRSS/FreshRSS/issues/1511 http://stackoverflow.com/questions/22360235/do-browsers-support-different-html5-pattern-regexp-features https://connect.microsoft.com/ie/feedback/details/836117/regex-bug-in-pattern-validator
2017-04-10Merge branch 'FreshRSS/dev' into multiuser-tokenGravatar Alexandre Alapetite
2017-04-10PSHB better unsubscribeGravatar Alexandre Alapetite
Cases when a user is deleted, or when a feed is deleted. Removed random key do reduce the risk of subscribing several times to the same PSHB feed.
2017-04-09Multi-user tokenGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/1390 https://github.com/FreshRSS/FreshRSS/issues/366
2017-03-02Fix SQLite CLI installGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/1445 https://github.com/FreshRSS/FreshRSS/issues/1443 https://github.com/FreshRSS/FreshRSS/issues/1443
2017-02-25Changelog 1423Gravatar Alexandre Alapetite
2017-02-25Missing checkUsername and const pattenGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/pull/1423 https://github.com/YunoHost-Apps/freshrss_ynh/issues/27#issuecomment-279792363
2017-02-19correct check username patternGravatar Clément
2017-02-16use function with preg_match to check usernameGravatar Clément
2017-02-16Possibility to register user having a '-', a '_' or a '.' in usernameGravatar Clément
2016-10-24CLI option no-default-feedsGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/1095
2016-10-24CLI do-installGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/1095 https://github.com/FreshRSS/FreshRSS/issues/1090
2016-10-22CLI delete user https://github.com/FreshRSS/FreshRSS/issues/1095Gravatar Alexandre Alapetite
2016-10-22CLI list-users and create-userGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/1095 https://github.com/FreshRSS/FreshRSS/issues/1090
2016-10-04Fix bug language option for new userGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/1273
2016-07-31Remove Mozilla Persona loginGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/1052
2015-08-22Add a system configuration pageGravatar Alexis Degrugillier
It allows to modify system configuration from the interface. At the moment, only limits are modifiable. The user limit was removed from the user page and added here along with categories and feeds limits.
2015-07-22Ask password to user before deleting its accountGravatar Marien Fressinaud
See https://github.com/FreshRSS/FreshRSS/issues/679
2015-07-22Give possibility to delete its own accountGravatar Marien Fressinaud
See https://github.com/FreshRSS/FreshRSS/issues/679
2015-07-22Registration action is handled and create a userGravatar Marien Fressinaud
See https://github.com/FreshRSS/FreshRSS/issues/679
2015-07-22Add some commentsGravatar Marien Fressinaud
2015-07-21Add a max_registrations limitGravatar Marien Fressinaud
- Allow user to create accounts (not implemented) - Admin only can set this limit See https://github.com/FreshRSS/FreshRSS/issues/679
2015-01-06Fix a call to availableLanguages() (bad object)Gravatar Marien Fressinaud
See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-06Fix setters on $user_confGravatar Marien Fressinaud
Old setters does not exist anymore, remove them. See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-06BREAKING FEATURE: Remove general in configGravatar Marien Fressinaud
General attribute has been removed from system config. Now subattributes (e.g. environment, salt, title, etc.) are directly accessible. YOU HAVE TO FIX YOUR ./data/config.php file! - Remove the general array - Values inside this array must be kept - To see what it must look like, please have a look to ./data/config.default.php (but keep your values!!). See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-06Fix Controllers to use the correct config systemGravatar Marien Fressinaud
See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-05Change name of user configuration var in ContextGravatar Marien Fressinaud
- FreshRSS_Context::$conf is replaced by FreshRSS_Context::$user_conf - Introduce FreshRSS_Context::$system_conf - Remove FreshRSS_Configuration object See https://github.com/FreshRSS/FreshRSS/issues/730
2014-12-21BREAKING FEATURE: move user dataGravatar Marien Fressinaud
- Create ./data/users/ folder - Move user configuration to ./data/users/username/config.php - Move sqlite db to ./data/users/username/db.sqlite - Move user logs to ./data/users/username/log.txt See https://github.com/FreshRSS/FreshRSS/issues/729
2014-12-11Fix i18n for update and user controllersGravatar Marien Fressinaud
2014-10-30Fix Minz_Error::error() -> use default valuesGravatar Marien Fressinaud