Custom Project Jun 7 2012 15:01:59

Hi, the project you have worked on for me before, I just need modification to this function, instead of creating new user, i need it to choose existing user from vb database:

function newuser($data) {

global $vbulletin;

$userid = 0;

if (!isset($data['yahoo_usernick']) OR empty($data['yahoo_usernick'])) return false;

$username = $data['yahoo_usernick'];

$email_user = create_random_string(6) . create_another_random_string(8);

$email_domain = substr($vbulletin->options['webmasteremail'], strpos($vbulletin->options['webmasteremail'], "@"));

$email = $email_user . $email_domain;

if (!strpos($email, "@"))


$unick = explode(" ", $username);

$email = $unick[0] . '@[url removed, login to view]';


$password = create_random_string(18);

$ip = random_ip();

$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_ARRAY);

$userdata->set('username', $username);

$userdata->set('email', $email);

$userdata->set('password', $password);

$userdata->set('ipaddress', $ip);

$userdata->set('signature', $vbulletin->options['icc_yahoo_attribution']);

$userdata->set('usergroupid', $vbulletin->options['icc_usergroup_id']);


if (!empty($userdata->errors)) return false;

$userid = $userdata->save();


// now add an av

if ($vbulletin->options['icc_import_avatars'])


if (isset($data['yahoo_user_photo_url']) AND !empty($data['yahoo_user_photo_url']))


// begin custom avatar code

require_once(DIR . '/includes/[url removed, login to view]');

require_once(DIR . '/includes/[url removed, login to view]');

$upload = new vB_Upload_Userpic($vbulletin);

$upload->data =& datamanager_init('Userpic_Avatar', $vbulletin, ERRTYPE_STANDARD, 'userpic');

$upload->userinfo['userid'] = $userid;

$upload->image =& vB_Image::fetch_library($vbulletin);

$upload->maxwidth = $vbulletin->userinfo['permissions']['avatarmaxwidth'];

$upload->maxheight = $vbulletin->userinfo['permissions']['avatarmaxheight'];

$upload->maxuploadsize = $vbulletin->userinfo['permissions']['avatarmaxsize'];

$upload->allowanimation = ($vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['cananimateavatar']) ? true : false;




return array('userid' => $userid, 'ip' => $ip);



* This function creates a new thread from the queue

* given a forumid and a timestamp

* @global

* @param integer $forumid the id of the forum to create a thread in

* @param integer $poststamp the timestamp of the new thread


Compétences : vBulletin

en voir plus : yahoo 7, signature database, jun avatar, database queue, 7 yahoo, timestamp, av, custom function php, avatar image php, custom modification, queue thread, yahoo options data, thread queue, php thread function, vbulletin custom code, forum custom, php yahoo project, php save signature, project queue, strpos array php, yahoo vbulletin, php strpos array, custom php code, global email database, modification existing code

Concernant l'employeur :
( 4 commentaires ) Toronto, Canada

Nº du projet : #1682881

Décerné à:


Hired by the Employer

%selectedBids___i_sum_sub_4% %project_currencyDetails_sign_sub_5% USD en 1 jour
(100 Commentaires)