Quote:
Originally Posted by muhannadhy
hi all ;
pleaze help me in making one or more of user fields to be unique; i mean if i added a user field called univ-ID ; and it should be unique for every member; like user name and email are unique by default.
pleaze i need this help as soon as possible :disappointed:
|
wow i realised that there is nothing like that in the stock install.
I'm sure a quick and dirty plugin like:
PHP Code:
$check=$vbulletin->db->query_first("SELECT value FROM " . TABLE_PREFIX . "userfield WHERE name='" . $field['name'] . "' AND value='". $field['value'] ."' AND userid!='" . $vbulletin->userinfo['userid'] . "'");
if (isset($check['value'])) {
# error redirect
exit;
}
//continue...
I haven't tested that and I am not sure the table fields are right and it doesn't display an error or anything, so it needs prettying up. Maybe some coder with more than 5 mins spare time could help more