summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2012-07-04 00:59:27 +0200
committerMichael Tänzer <neo@nhng.de>2012-07-04 00:59:27 +0200
commitfd4fbe21e9ef63c555469b595f7748fadfb977f4 (patch)
tree0669f7ffd8c0a26bd47ae8dfd6811b5ea9b3d9dd /includes
parentd4c82b6ef229087fa8ad576430587c6ea1a14d50 (diff)
parent1e98bc7a794467ef437f17b826cecd5ccb9fe6d2 (diff)
downloadcacert-devel-fd4fbe21e9ef63c555469b595f7748fadfb977f4.tar.gz
cacert-devel-fd4fbe21e9ef63c555469b595f7748fadfb977f4.tar.xz
cacert-devel-fd4fbe21e9ef63c555469b595f7748fadfb977f4.zip
Merge branch 'bug-967' into release
Diffstat (limited to 'includes')
-rw-r--r--includes/account.php17
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'");
+ }
}
}