#| -*-Scheme-*-
-$Id: db.scm,v 1.3 2004/11/22 19:45:23 cph Exp $
+$Id: db.scm,v 1.4 2004/11/22 20:08:42 cph Exp $
Copyright 2003,2004 Massachusetts Institute of Technology
")")
#t)))
+(define (db-get-user-password user-name)
+ (let ((result
+ (db-run-query "SELECT enabled_p, password"
+ " FROM users"
+ " WHERE user_name = " (db-quote user-name))))
+ (if (> (pgsql-n-tuples result) 0)
+ (let ((password
+ (and (string=? (pgsql-get-value result 0 0) "t")
+ (pgsql-get-value result 0 1))))
+ (pgsql-clear result)
+ password)
+ (begin
+ (pgsql-clear result)
+ #f))))
+
(define (db-change-user-password user-name password)
(guarantee-known-user user-name)
(db-run-cmd "UPDATE users"
#| -*-Scheme-*-
-$Id: xdoc.pkg,v 1.2 2004/11/22 19:45:27 cph Exp $
+$Id: xdoc.pkg,v 1.3 2004/11/22 20:08:46 cph Exp $
Copyright 2004 Massachusetts Institute of Technology
db-get-persistent-value
db-get-ps-structure
db-get-saved-output
+ db-get-user-password
db-intern-global-value!
db-intern-persistent-value!
db-known-user?