+ if (S::logged() && S::user()->checkPerms('admin')) {
+ $types = array(S::user()->type);
+ $perms = DirEnum::getOptions(DirEnum::ACCOUNTTYPES);
+ ksort($perms);
+ foreach ($perms as $type => $perm) {
+ if (!empty($perm) && $type != $types[0]) {
+ $types[] = $type;
+ }
+ }
+ $this->assign('account_types_list', $types);
+
+ $skins = DirEnum::getOptions(DirEnum::SKINS);
+ asort($skins);
+ $this->assign('skin_list', $skins);
+ }
+ }
+
+ /** Force the skin to use, bypassing user choice.
+ * Typically used for the 'register' page.
+ * @param $skin The skin to use.
+ */
+ public function forceSkin($skin)
+ {
+ $this->forced_skin = $skin;
+ }
+
+ /** Choose another 'default' skin.
+ * Typically used for the 'Auth Groupe X' login page.
+ * @param $skin The default skin to use.
+ */
+ public function setDefaultSkin($skin)
+ {
+ $this->default_skin = $skin;