+ // Now that we know this is the profile of an existing user, we can
+ // switch to the appropriate template.
+ $page->changeTpl('profile/profile.tpl', SIMPLE);
+ require_once 'user.func.inc.php';
+
+ // Determines the access level at which the profile will be displayed.
+ if (!S::logged() || Env::v('view') == 'public') {
+ $view = 'public';
+ } else if (S::logged() && Env::v('view') == 'ax') {
+ $view = 'ax';
+ } else {
+ $view = 'private';
+ }
+
+ // Determines is the user is registered, and fetches the user infos in
+ // the appropriate way.