X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmodules%2Fmigrate%2Fserv_migrate.c;h=7c62d34652754747a03a03ab6e433f6e67965d1e;hp=d55f8e9de1c9ad8f424318a93a72d6e299e75a4a;hb=9ffea7c3315046ddcea2589656c13da5f5e0c076;hpb=bdfa2e9b6af7e32b11461433a28dd6551f830888 diff --git a/citadel/modules/migrate/serv_migrate.c b/citadel/modules/migrate/serv_migrate.c index d55f8e9de..7c62d3465 100644 --- a/citadel/modules/migrate/serv_migrate.c +++ b/citadel/modules/migrate/serv_migrate.c @@ -1,7 +1,7 @@ /* * This module dumps and/or loads the Citadel database in XML format. * - * Copyright (c) 1987-2018 by the citadel.org team + * Copyright (c) 1987-2019 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3. @@ -114,21 +114,27 @@ void xml_strout(char *str) { /* * Export a user record as XML */ -void migr_export_users_backend(struct ctdluser *buf, void *data) { +void migr_export_users_backend(char *username, void *data) { + + struct ctdluser u; + if (CtdlGetUser(&u, username) != 0) { + return; + } + client_write(HKEY("\n")); - cprintf("%d\n", buf->version); - cprintf("%ld\n", (long)buf->uid); - client_write(HKEY("")); xml_strout(buf->password); client_write(HKEY("\n")); - cprintf("%u\n", buf->flags); - cprintf("%ld\n", buf->timescalled); - cprintf("%ld\n", buf->posted); - cprintf("%d\n", buf->axlevel); - cprintf("%ld\n", buf->usernum); - cprintf("%ld\n", (long)buf->lastcall); - cprintf("%d\n", buf->USuserpurge); - client_write(HKEY("")); xml_strout(buf->fullname); client_write(HKEY("\n")); - cprintf("%ld\n", buf->msgnum_bio); - cprintf("%ld\n", buf->msgnum_pic); + cprintf("%d\n", u.version); + cprintf("%ld\n", (long)u.uid); + client_write(HKEY("")); xml_strout(u.password); client_write(HKEY("\n")); + cprintf("%u\n", u.flags); + cprintf("%ld\n", u.timescalled); + cprintf("%ld\n", u.posted); + cprintf("%d\n", u.axlevel); + cprintf("%ld\n", u.usernum); + cprintf("%ld\n", (long)u.lastcall); + cprintf("%d\n", u.USuserpurge); + client_write(HKEY("")); xml_strout(u.fullname); client_write(HKEY("\n")); + cprintf("%ld\n", u.msgnum_bio); + cprintf("%ld\n", u.msgnum_pic); client_write(HKEY("\n")); }