authenticate/authvlib.cc
changeset 2 b3afb9f1e801
parent 0 6f7a81934006
--- a/authenticate/authvlib.cc	Sun Jan 20 00:12:17 2008 +0100
+++ b/authenticate/authvlib.cc	Sun Jan 20 00:22:09 2008 +0100
@@ -82,15 +82,15 @@
   }
   else {
     set_user(basepw);
-    vpwentry* vpw = domain->lookup(virtname, true);
-    if(!vpw || !vpw->mailbox)
+    vpwentry* vpw = domain->lookup(virtname);
+    if(!vpw || !vpw->has_mailbox)
       fail_login("Invalid or unknown virtual user");
     if(!vpw->authenticate(password))
       fail_login("Invalid or incorrect password");
     if(vpw->expiry < (unsigned)time(0))
       fail_login("Account has expired");
     vpw->export_env();
-    return new user_data(basepw, vpw->mailbox, vpw->name);
+    return new user_data(basepw, vpw->directory, vpw->name);
   }
 }