Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix update, make column nullable #13261

Merged
merged 6 commits into from Aug 9, 2018
Merged

Fix update, make column nullable #13261

merged 6 commits into from Aug 9, 2018

Conversation

diosmosis
Copy link
Member

Fixes #13260

CC @mattab

@diosmosis diosmosis added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Aug 7, 2018
@diosmosis diosmosis added this to the 3.6.0 milestone Aug 7, 2018
public function getMigrations(Updater $updater)
{
// use php date since mysql date/time might be different and might lock users out for a while. and subtract days just to be safe.
$passwordModified = Date::factory('now')->subDay(14);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the date-time will be 14 days offset from the actual time where password was changed, would it be possible not to have this 14 days offset somehow? As we may display in the future the time when the password was changed in the UI, the value should be accurate

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we shouldn't set the value on Matomo update at all and leave it blank. Guess the other code can be adjusted to ignore the additional checks if the password has never changed...

Setting the value to any other value, like now() or the user creation date might be wrong when displayed in the UI.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, will make the column null-able

@diosmosis
Copy link
Member Author

@mattab modified the PR & tested on demo2

@diosmosis diosmosis changed the title Fix update, use php time not mysql time Fix update, make column nullable Aug 8, 2018
@mattab mattab merged commit b5dd4b7 into 3.x-dev Aug 9, 2018
@sgiehl sgiehl deleted the session-regression branch August 9, 2018 09:35
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018
* Do not use mysql time when setting ts password modified initial date.

* Correct namespace

* Missing import

* fix sql

* Make ts_password_modified column nullable so when eventually displayed, will not result in an inaccurate display.

* fix update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants