We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ProfileController.php `public function friends($atts = []){ $id = $this->loggedUser->id; if(!empty($atts['id'])){ $id = $atts['id']; }
// Pegando informações do usuário $user = UserHandler::getUser($id, true); if(!$user){ $this->redirect('/'); } $dateFrom = new \DateTime($user->birthdate); $dateTo = new \DateTime('today'); $user->ageYears = $dateFrom->diff($dateTo)->y; // Verificando se o usuário logado já está seguindo o usuário $isFollowing = false; if($user->id != $this->loggedUser->id){ $isFollowing = UserHandler::isFollowing($this->loggedUser->id, $user->id); } $this->render('profile_friends', [ 'loggedUser' => $this->loggedUser, 'user' => $user, 'isFollowing' => $isFollowing ]); }
========================================================== profile_friends.php
<div class="full-friend-list"> <?php foreach($user->followers as $follower): ?> <div class="friend-icon"> <a href="<?=base;?>/perfil/<?=$follower->id; ?>"> <div class="friend-icon-avatar"> <img src="<?=$base;?>/media/avatars/<?=$follower->avatar;?>" /> </div> <div class="friend-icon-name"> <?=$follower->name;?> </div> </a> </div> <?php endforeach; ?> </div> </div>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ProfileController.php
`public function friends($atts = []){
$id = $this->loggedUser->id;
if(!empty($atts['id'])){
$id = $atts['id'];
}
==========================================================
profile_friends.php
The text was updated successfully, but these errors were encountered: