30 lines
395 B
Go
Raw Normal View History

2017-06-23 14:53:07 +00:00
package main
import (
"github.com/animenotifier/arn"
)
func main() {
// Get a stream of all users
2017-06-27 12:38:36 +00:00
allUsers, err := arn.StreamUsers()
2017-06-23 14:53:07 +00:00
if err != nil {
panic(err)
}
// Iterate over the stream
for user := range allUsers {
if user.LastSeen != "" {
continue
}
user.LastSeen = user.LastLogin
if user.LastSeen == "" {
user.LastSeen = user.Registered
}
user.Save()
}
}