$invited_from = array();
$r = $db2->query('SELECT DISTINCT user_id FROM users_invitations WHERE recp_email="'.$db2->e($email).'" LIMIT 1');
if( $db2->num_rows($r) > 0 ) {
while($tmpu = $db2->fetch_object($r)) {
$db2->query('INSERT INTO users_followed SET who="'.$tmpu->user_id.'", whom="'.$user_id.'", date="'.time().'", whom_from_postid="'.$this->network->get_last_post_id().'" ');
$db2->query('UPDATE users SET num_followers=num_followers+1 WHERE id="'.$user_id.'" LIMIT 1');
$this->network->get_user_follows($tmpu->user_id, TRUE);
$invited_from[$tmpu->user_id] = TRUE;
}
$this->network->get_user_by_id($user_id, TRUE);
$this->network->get_user_follows($user_id, TRUE);
$db2->query('UPDATE users_invitations SET recp_is_registered=1, recp_user_id="'.$user_id.'" WHERE recp_email="'.$db2->e($email).'" ');
}
$key = md5(time().rand(0,999999));
$_SESSION['reg_'.$key] = (object) array (
'network_id' => $this->network->id,
'user_id' => $user_id,
);
$notif = new notifier();
$notif->set_notification_obj('network', 1);
$notif->onJoinNetwork();
//if($network_members < 1001 ){
// $this->redirect( $C->SITE_URL.'signup/follow/regid:'.$key);
//}else{
$this->redirect($C->SITE_URL.'settings/avatar');
//}
}
}
}
$this->redirect($C->SITE_URL.'settings/avatar'); - bölümünde ki "settings/avatar" değiştirilmiştir.