/**
  * @return string
  * @throws class_exception
  * @permissions edit
  */
 protected function actionSwitchToUser()
 {
     $strReturn = "";
     if (class_module_system_module::getModuleByName("system")->rightEdit() && class_carrier::getInstance()->getObjSession()->isSuperAdmin()) {
         //reset the aspect
         $strAddon = "";
         $objDefaultAspect = class_module_system_aspect::getDefaultAspect();
         if ($objDefaultAspect !== null) {
             $strAddon = "&aspect=" . $objDefaultAspect->getSystemid();
         }
         $objNewUser = new class_module_user_user($this->getSystemid());
         if ($this->objSession->switchSessionToUser($objNewUser)) {
             class_admin_helper::flushActionNavigationCache();
             $this->adminReload(class_link::getLinkAdminHref("dashboard", "", $strAddon));
             return "";
         } else {
             throw new class_exception("session switch failed", class_exception::$level_ERROR);
         }
     } else {
         $strReturn .= $this->getLang("commons_error_permissions");
     }
     return $strReturn;
 }