What column can I use for badge for users with at least one login?


(Stephen Birarda) #1

I’m trying to auto grant a badge to users who have been created before today but who’ve logged into the forum at least once.

I have everything but the logged in at least once part. What column should I use for that?


(Jeff Atwood) #2

You mean they have at least 1 return visit? Creating an account would be logging in by definition…

We really should have a “returned for X days in a row” badge, perhaps we can implement that for 1.6.


(Stephen Birarda) #3

I may not have explained myself very well, but I got what I wanted thanks to SchemaSpy - discourse.public.

I added last_seen_at IS NOT NULL and that filtered it down to people who have at least visited once.

This applies specifically to our use case because we used to auto-generate accounts for the users in the database we are SSOing against. That left us with a bunch of discourse accounts for people who have never participated in the forum.


(Stephen Birarda) #4

Actually modified that to be last_posted_at and that works even better for the group we’re trying to target.

Thanks!