Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(isset($_GET['id'])){
- $userID = Input::get('id');
- $userQ = $db->query("SELECT * FROM profiles LEFT JOIN users ON user_id = users.id WHERE user_id = ?",array($userID));
- $thatUser = $userQ->first();
- if($thatUser!=null){
- if($thisUserID == $userID){
- $editbio = ' <small><a href="edit_profile.php">Edit Bio</a></small>';
- }else{
- $editbio = '';
- }
- $ususername = ucfirst($thatUser->username)."'s Profile";
- $grav = get_gravatar(strtolower(trim($thatUser->email)));
- $useravatar = '<img src="'.$grav.'" class="img-thumbnail" alt="'.$ususername.'">';
- $usbio = html_entity_decode($thatUser->bio);
- }else{
- $ususername = "404's Profile";
- $usbio = 'User not found';
- $useravatar = '';
- $editbio = ' <small><a href="/">Go to the homepage</a></small>';
- }
- }else{
- $ususername = "404's Profile";
- $usbio = 'User not found';
- $useravatar = '';
- $editbio = ' <small><a href="/">Go to the homepage</a></small>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement