View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0025110||mantisbt||authentication||public||2018-12-24 14:10||2019-03-16 20:20|
|Target Version||2.20.0||Fixed in Version||2.20.0|
|Summary||0025110: Token error when login with a newly created user|
When login the first time with a new user, after setting the password, a token expiration error is displayed.
The problem is that the confirmation of account_update.php, after setting password, redirects again to account_update. The intended behaviour is to redirect to index.php.
so, this is related to the code that checks if the user only has one project, and his default is ALL_PROJECTS
|Steps To Reproduce|
|Tags||No tags attached.|
Do you know why reloading the page is needed there?
I might have added it to ensure that the project selector was correctly loaded after changing the current project, but honestly 6 years after the fact, I'm not really sure so your guess is as good as mine... ;-)
Note: with 2.0, that code moved to layout API layout_navbar_projects_menu(). The current code has an exception not to redirect if the page is
MantisBT: master 8c704951
Committer: dregad Details Diff
|Rewrite hide project list and default project check
Previously, when a user only has one project, some things happens:
- The project selector was hidden, as it is not useful without more
- A check is performed where if current project is ALL_PROJECTS, then
current and default project are updated to the only available project.
To fix issues with that implementation, the logic has been separated:
- Helper function to check if the user has more than one project. It's
used in layout_api to decide if the project selector must be shown.
- Helper function to check if the user has ALL_PROJECTS as
current/default project when only one is available. In that case,
update current and modify default in user preferences.
Fixes: 0025110, 0025133
|mod - core/current_user_api.php||Diff File|
|mod - core/layout_api.php||Diff File|
|mod - core/user_api.php||Diff File|