2017-06-27 14:38:36 +02:00

30 lines
395 B
Go

package main
import (
"github.com/animenotifier/arn"
)
func main() {
// Get a stream of all users
allUsers, err := arn.StreamUsers()
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()
}
}