diff --git a/account.inc.php b/account.inc.php index 94c831d..7984207 100644 --- a/account.inc.php +++ b/account.inc.php @@ -215,7 +215,7 @@ function account_add_role($accounts_id, $roles_id, $conferences_id, $password = return "invalidaccount"; } if(mysql_result(mysql_query("SELECT COUNT(*) FROM roles WHERE id = $roles_id"), 0) != 1){ - return "invalidrole($roles_id)"; + return "invalidrole"; } if(mysql_result(mysql_query("SELECT COUNT(*) FROM conferences WHERE id = $conferences_id"), 0) != 1){ return "invalidconference"; @@ -303,7 +303,7 @@ function account_add_role($accounts_id, $roles_id, $conferences_id, $password = $error = ''; } else { - $error = 'invalidrole(invite only)'; + $error = 'invalidrole(invite_only)'; } break; } diff --git a/api.php b/api.php index e67a911..2a00b30 100644 --- a/api.php +++ b/api.php @@ -792,10 +792,12 @@ switch($request[0]) { updateSessionRoles(); break; case "invalidrole": $ret['status']="error"; $ret['error']="Invalid role"; break; + case "invalidrole(invite only)": $ret['status']="error"; $ret['error']="Invalid role - registation by invite only"; break; + case "invalidrole(account_add_role_allowed)": $ret['status']="error"; $ret['error']="Invalid role - account_add_role_allowed said no"; break; case "invalidaccount": $ret['status']="error"; $ret['error']="Invalid account"; break; case "invalidconference": $ret['status']="error"; $ret['error']="Invalid conference"; break; case "invalidpassword": $ret['status']="error"; $ret['error']="Invalid password for role"; break; - default: $ret['status']="error"; $ret['error']="unknown role add error"; + default: $ret['status']="error"; $ret['error']="unknown role add error. addstatus=[$addstatus]"; } break;