From 702a40c85ab3509c9a1bfedb0cb6406b4e97ae15 Mon Sep 17 00:00:00 2001 From: Michal Piotrowski Date: Mon, 11 May 2015 13:58:46 +0200 Subject: [PATCH] fix mod_mam_odbc_user for ODBC layer --- apps/ejabberd/src/mod_mam_odbc_user.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/ejabberd/src/mod_mam_odbc_user.erl b/apps/ejabberd/src/mod_mam_odbc_user.erl index b2fe0a2795c..213d3f55042 100644 --- a/apps/ejabberd/src/mod_mam_odbc_user.erl +++ b/apps/ejabberd/src/mod_mam_odbc_user.erl @@ -120,8 +120,10 @@ query_archive_id(Host, Server, UserName) -> Result = do_query_archive_id(DbType, Host, SServer, SUserName), case Result of - {selected, [<<"id">>], [{IdBin}]} -> + {selected, [<<"id">>], [{IdBin}]} when is_binary(IdBin) -> binary_to_integer(IdBin); + {selected, [<<"id">>], [{IdBin}]}-> + IdBin; {selected, [<<"id">>], []} -> %% The user is not found create_user_archive(Host, Server, UserName),