chiark / gitweb /
'confirm' now logs the user in (and sends back their username so the
[disorder] / lib / client.c
index 1dac922363ab7edbe2e6fdbf02384021cc1ab156..aabea873291cbc6fe6c2f0aa6ef8e3fc839d7f0f 100644 (file)
@@ -1139,7 +1139,13 @@ int disorder_register(disorder_client *c, const char *user,
  * @return 0 on success, non-0 on error
  */
 int disorder_confirm(disorder_client *c, const char *confirm) {
-  return disorder_simple(c, 0, "confirm", confirm, (char *)0);
+  char *u;
+  int rc;
+  
+  if(!(rc = dequote(disorder_simple(c, &u, "confirm", confirm, (char *)0),
+                   &u)))
+    c->user = u;
+  return rc;
 }
 
 /** @brief Make a cookie for this login