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

Last Sign-In not set at user creation. #21698

Closed
JulienPalard opened this issue Nov 6, 2022 · 6 comments · Fixed by #21731
Closed

Last Sign-In not set at user creation. #21698

JulienPalard opened this issue Nov 6, 2022 · 6 comments · Fixed by #21731
Labels
Milestone

Comments

@JulienPalard
Copy link
Contributor

JulienPalard commented Nov 6, 2022

Description

In admin/users I see users with Last Sign-In set to Never Signed-In while they obviously kind of "signed in" (one of them at least created an organization).

It feel wrong that a user that "never signed-in" have created an organization.

So to me it feel like the "last sign-in" should be set to the current date when the user is "automatically signed in" at account creation.

Gitea Version

1.17.3

Can you reproduce the bug on the Gitea demo site?

No (need to be admin, I don't think I'll get admin there).

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Debian

How are you running Gitea?

Self-hosted instance, installed from https://dl.gitea.io, started using systemd.

Database

PostgreSQL

@lunny lunny added this to the 1.17.4 milestone Nov 7, 2022
@wolfogre
Copy link
Member

wolfogre commented Nov 8, 2022

I can't reproduce the bug. Actually, the "last sign-in" has already been set to the current date after account creation. I checked the previous versions, and it always works like that since the "auto sign in" has been added at #4615.

I think it may be caused by something else.

@JulienPalard
Copy link
Contributor Author

Strange. I don't know how I can diagnose this though. Out of 11 users 5 of them are marked "Never Signed-In", one of them has created an org, but none of them has created a repo.

@techknowlogick
Copy link
Member

Thanks for this ticket.

I'm able to see this behaviour on try.gitea.io (as an admin).

a user with one repo, a creation date, but no sign in date

@JulienPalard What is the setup for your instance, is it public, do you require email confirmation for signups, or any other info you may think might be helpful.

@wolfogre
Copy link
Member

wolfogre commented Nov 9, 2022

I reproduced the bug by steps:

  • Sign up a user with an email address.
  • Click the active link in the confirmation email and input password to sign in.
  • Do something like creating a repo, then logout.
  • The user will be "Never Signed-In".

I didn't reproduce the bug before because I didn't enable the email confirmation.

Trying to figure it out and fix it.

techknowlogick pushed a commit that referenced this issue Nov 9, 2022
Fix #21698.

Set the last login time to the current time when activating the user
successfully.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
fsologureng pushed a commit to fsologureng/gitea that referenced this issue Nov 9, 2022
Fix go-gitea#21698.

Set the last login time to the current time when activating the user
successfully.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
lunny added a commit that referenced this issue Nov 10, 2022
Backport #21731.

Fix #21698.

Set the last login time to the current time when activating the user
successfully.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@JulienPalard
Copy link
Contributor Author

@JulienPalard What is the setup for your instance, is it public, do you require email confirmation for signups, or any other info you may think might be helpful.

Our setup is fully public here: https://github.com/AFPy/infra/blob/main/gitea.yml and here : https://github.com/AFPy/infra/tree/main/roles/gitea (browse the tasks and templates folders if you're not acustomed to Ansible).

TL;DR we have REGISTER_EMAIL_CONFIRM = true.

@JulienPalard
Copy link
Contributor Author

Oh I'm late to the party :)

Thanks taking the time to understand the bug and thanks for fixing it!!!

techknowlogick pushed a commit that referenced this issue Nov 11, 2022
Backport #21731.

Fix #21698.

Set the last login time to the current time when activating the user
successfully.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants