On Sat, Mar 31, 2012 at 2:50 PM, Stephan Beal <sgb...@googlemail.com> wrote:
> i _think_ the right thing to do there would be to use call > login_set_user_cookie() to replace the several lines which deal with the > cookie. That said: as Richard says: this isn't a feature any of us touches, > so i'm hesitant to tinker with it :/. > @Justin: can you please try this out and see if it does the trick: Index: src/login.c ================================================================== --- src/login.c +++ src/login.c @@ -1229,23 +1229,11 @@ ); free(zPw); /* The user is registered, now just log him in. */ uid = db_int(0, "SELECT uid FROM user WHERE login=%Q", zUsername); - zCookieName = login_cookie_name(); - zExpire = db_get("cookie-expire","8766"); - expires = atoi(zExpire)*3600; - zIpAddr = PD("REMOTE_ADDR","nil"); - - zCookie = db_text(0, "SELECT '%d/' || hex(randomblob(25))", uid); - cgi_set_cookie(zCookieName, zCookie, login_cookie_path(), expires); - record_login_attempt(zUsername, zIpAddr, 1); - db_multi_exec( - "UPDATE user SET cookie=%Q, ipaddr=%Q, " - " cexpire=julianday('now')+%d/86400.0 WHERE uid=%d", - zCookie, ipPrefix(zIpAddr), expires, uid - ); + login_set_user_cookie( zUsername, uid, NULL ); redirect_to_g(); } } } If so i'll clean that up (remove now-unused vars) and get it committed. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users