Quote:
Originally posted by FireFly
PHP Code:
function chkprofilefields($userid, $fieldnumber) {
global $DB_site, $bbuserinfo;
if ($bbuserinfo['userid'] == $userid) {
$field = $bbuserinfo['field'.$fieldnumber];
} else {
$userinfo = getuserinfo($userid);
$field = $userinfo['field'.$fieldnumber];
}
if (empty($field)) {
eval('standarderror("'.gettemplate('error_emptyrequiredfields').'");');
}
}
This will only generate a query if it's used not on the browsing user.
|
thanks FireFly... seriously its good to learn somethign new

I will have to remember this for further refrences

because it doesn't run queries and that is cool

but just a question... doesn't the getuserinfo() function use a query or no?
g-force2k2