Example #1
0
 public static function userProfile($input)
 {
     $cleanInput = DB::clean($input);
     $id = $cleanInput['id'];
     //$user = self::checkLoginStatus();
     $output = ['browserTitle' => 'Användarprofil', 'page' => 'user.profile.twig', 'ads' => Ads::getUserAds($id), 'user' => Self::getUser($id)];
     return $output;
 }
Example #2
0
 public static function dashboard()
 {
     $user = self::checkLoginStatus();
     if ($user) {
         $output = ['browserTitle' => 'Hej och välkommen ' . $user->firstname . '!', 'page' => 'user.dashboard.twig', 'user' => $user, 'ads' => Ads::getUserAds(), 'interestingAds' => Ads::getInterestingAds()];
     } else {
         $output = ['page' => 'home.twig'];
     }
     return $output;
 }