Hello,
Following the previous ticket, I did this to display the list of friends in invit.php
I am looking for but can not do that when you click on the "Invite" button, the invitation is sent to the person concerned.
<?php
//Code à ajouter aux fichiers invit.php
$id = $this->input->get('userid', null, 'int');
$user = ES::user($id);
$model = ES::model('Friends');
$options = array('state' => SOCIAL_FRIENDS_STATE_FRIENDS , 'limit' => 2000);
$friends = $model->getFriends($user->id, $options);
// print_r ($friends);
?>
<?php
foreach ($friends as $element) {
{
$iduser = $element->id;
$idusername = $element->username;
$fid=ES::user($iduser);
}
?>
<div style="float:left;height:80px;width:100%;border-bottom:solid 1px #d2d2d2">
<div style="margin:10px;float:left"><?php echo '<img src="' . $fid->getAvatar() . '" />'; ?> </div>
<div style="color:#000;font-weight:700;margin:5px 0px"><?php echo $idusername;?> </div>
<div><?php echo $fid->getFieldValue('gender');?> </div>
<div style="float:left;color:#9e9e9e;"><?php echo $fid->getFieldValue('ADDRESS');?> </div>
<div style="margin-left:350px;margin-top:-25px">
<button data-invite-button type="button" class="btn btn-sm btn-es-primary"><?php echo "Inviter"; ?></button>
</div>
</div>
<?php
}
?>
How should I do this?
Best regards.
Eric