Commit 3f150979 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add perm function for webdb.

parent 4848f41e
......@@ -22,6 +22,15 @@ $TBDB_OSID_OSIDLEN = 30;
$TBDB_OSID_VERSLEN = 12;
$TBDB_IMAGEID_IMAGEIDLEN = 30;
#
# User status field.
#
$TBDB_USERSTATUS_ACTIVE = "active";
$TBDB_USERSTATUS_NEWUSER = "newuser";
$TBDB_USERSTATUS_UNAPPROVED = "unapproved";
$TBDB_USERSTATUS_UNVERIFIED = "unverified";
$TBDB_USERSTATUS_FROZEN = "frozen";
#
# Trust. Define the trust level as an increasing value. Then define a
# function to return whether the given trust is high enough.
......@@ -955,6 +964,14 @@ function TBUserPCs($uid)
return mysql_num_rows($query_result);
}
function TBWebdbAllowed($uid) {
$query_result =
DBQueryFatal("select dbedit from users ".
"WHERE uid='$uid' and dbedit=1");
return mysql_num_rows($query_result);
}
#
# DB Interface.
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment