@@ 25-42 (lines=18) @@ | ||
22 | * @param \Base $f3 |
|
23 | * @return void |
|
24 | */ |
|
25 | public function apps(\Base $f3) |
|
26 | { |
|
27 | $this->redirectLoggedOutUser(); |
|
28 | $this->csrf(); |
|
29 | ||
30 | $oAuth2Model = Models\OAuth2::instance(); |
|
31 | ||
32 | // fetch the user's apps |
|
33 | $f3->set('apps', $oAuth2Model->getUserApps($f3->get('uuid'))); |
|
34 | ||
35 | $f3->set('breadcrumbs', [ |
|
36 | _('My Account') => 'user', |
|
37 | _('Apps') => 'api_apps', |
|
38 | ]); |
|
39 | ||
40 | $f3->set('form', $f3->get('REQUEST')); |
|
41 | echo \View::instance()->render('apps/apps.phtml'); |
|
42 | } |
|
43 | ||
44 | ||
45 | /** |
@@ 500-516 (lines=17) @@ | ||
497 | * @param \Base $f3 |
|
498 | * @return void |
|
499 | */ |
|
500 | public function profile(\Base $f3) |
|
501 | { |
|
502 | $this->redirectLoggedOutUser(); |
|
503 | $this->csrf(); |
|
504 | ||
505 | $f3->set('breadcrumbs', [ |
|
506 | _('My Account') => 'user', |
|
507 | _('My Profile') => 'profile', |
|
508 | ]); |
|
509 | ||
510 | // fetch profile |
|
511 | $usersModel = Models\Users::instance(); |
|
512 | $profileData = $usersModel->getProfile($f3->get('uuid')); |
|
513 | $f3->set('form', $profileData); |
|
514 | ||
515 | echo \View::instance()->render('user/profile.phtml'); |
|
516 | } |
|
517 | ||
518 | ||
519 | /** |