Skip to content

Commit

Permalink
fix login
Browse files Browse the repository at this point in the history
  • Loading branch information
nikotung committed Apr 1, 2022
1 parent 2d71fd8 commit 33c1f87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion user/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type sign struct {

func (u *User) IsLogin() bool {

return time.Now().Unix() > u.Expire
return u.Expire > 0 && time.Now().Unix() > u.Expire
}

func (u *User) UpdateToken(uid, token string) error {
Expand Down

0 comments on commit 33c1f87

Please sign in to comment.