+ if (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);
+ }