diff options
Diffstat (limited to 'includes/account.php')
-rw-r--r-- | includes/account.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/includes/account.php b/includes/account.php index 554713e..72165df 100644 --- a/includes/account.php +++ b/includes/account.php @@ -2289,8 +2289,21 @@ $_SESSION['_config']['errmsg'] = sprintf(_("Wasn't able to match '%s' against any user in the system"), sanitizeHTML($_REQUEST['email'])); } else { $row = mysql_fetch_assoc($res); - mysql_query("insert into `org` set `memid`='".intval($row['id'])."', `orgid`='".intval($_SESSION['_config']['orgid'])."', - `masteracc`='$masteracc', `OU`='$OU', `comments`='$comments'"); + if ( !is_assurer(intval($row['id'])) ) + { + $id = $oldid;
+ $oldid=0;
+ $_SESSION['_config']['errmsg'] = + _("The user is not an Assurer yet"); + } else { + mysql_query( + "insert into `org` + set `memid`='".intval($row['id'])."', + `orgid`='".intval($_SESSION['_config']['orgid'])."', + `masteracc`='$masteracc', + `OU`='$OU', + `comments`='$comments'"); + } } } |