+ if (!auth_sqlite_getuserinfo(user, service, authinfo))
+ // Fatal error - such as Sqlite being down
+ return (1);
+
+ if (authinfo.home.empty()) // User not found
+ return (-1);
+
+ memset(&aa, 0, sizeof(aa));
+
+ /*aa.sysusername=user;*/
+ aa.sysuserid= &authinfo.uid;
+ aa.sysgroupid= authinfo.gid;
+ aa.homedir=authinfo.home.c_str();
+ aa.maildir=authinfo.maildir.empty() ? NULL:authinfo.maildir.c_str();
+ aa.address=authinfo.username.c_str();
+ aa.passwd=authinfo.cryptpw.c_str();
+ aa.clearpasswd=authinfo.clearpw.c_str();
+ aa.fullname=authinfo.fullname.c_str();
+ aa.quota=authinfo.quota.empty() ? NULL:authinfo.quota.c_str();
+ aa.options=authinfo.options.c_str();
+ return ((*callback)(&aa, arg));
+}