func SetLastLoggedIn(context appengine.Context, w http.ResponseWriter) os.Error { userobj, err := GetCurrentHowlUser(context) if userobj == nil || err != nil { return os.NewError("No such user: " + user.Current(context).Id) } userobj.LastLogin = model.Now() return userobj.Update(context) }
/* Check the uniqueness of a username in the datastore. * * Returns true if there is no such uid in the datastore, thus the uid will be * unique in the store. */ func IsUidUnique(context appengine.Context, uid string) bool { err := (&model.HowlUser{"", uid, "", "", "", model.Now()}).Read(context) if err != nil { log.Println("Datastore error retreiving HowlUser with uid " + uid + ": " + err.String()) return true } return false }