mod_admin_extras / check_account returns no value

Greetings. First post. I need to check if a user exists, and then create an account if he does not. I also need to add and remove roster items. I already have the add_rosteritem and remove_rosteritem commands working via mod_rest. When I execute check_account, I do not get a return value of any kind, valid user or not. Looking at the logs, I see that it executes the command -- and then nothing else. I tried with a Mysql database and with Mnesia. Below is an excerpt from ejabberd.log while running Mnesia:

=INFO REPORT==== 2011-02-01 20:08:11 ===
D(<0.3596.0>:ejabberd_commands:314) : Executing command ejabberd_auth:is_user_exists with Args=["test_user_tom", "xx.xx.xx.xx"]

As a workaround, I can switch to Mysql and hit the database with something like the Ruby Sequel ORM for the query. That would be quick and dirty, but I'd much prefer to use mnesia. In any event, time is short for me. Any help to fix / workaround greatly appreciated. I have minimal Erlang skills [ as in none ].

Cheers! Paul

I test with this Python

I test with this Python code:

import urllib2

server_url = 'http://localhost:5280/rest/'

#call = 'check_account badlop localhost'
call = 'check_account badlop343434 localhost'

resp = urllib2.urlopen(server_url, call)
result = resp.read()
print result

When I use the call with an existing account, I get 0, when I use a non-existent account, I get 1 in the shell.

Syndicate content