Fix invalid argument errors if user has no Mahara account

Signed-off-by: Tony Butler <tonyjbutler@gmail.com>