Menu

Admin and portal user profile

2016-06-21
2016-11-01
  • delefemiaoa

    delefemiaoa - 2016-06-21

    I mistakenly added all profiles to admin profile. whenever i login it always direct me to portal user web page. How do regain my admin menu to work with? Please anyone who can urgently help?

     
  • Denis

    Denis - 2016-06-21

    Hmm,

    Quick and dirty fix:

    Backup the file pages/UI.php
    Edit the file pages/UI.php, locate the line:

        $sLoginMessage = LoginWebPage::DoLogin();
    

    (around line 294, depending on your version of iTop)

    Change it to:

        $sLoginMessage = LoginWebPage::DoLogin(false, true);
    

    Connect to iTop, and change your profile and save.

    Revert the file UI.php to its original version.

     
    • delefemiaoa

      delefemiaoa - 2016-06-21

      Thanks
      How do i locate this file 'pages/UI.php"

       
  • Denis

    Denis - 2016-06-21

    On the server, where you installed iTop, look for the subidrectory "pages" then the file "UI.php".

     
    • delefemiaoa

      delefemiaoa - 2016-06-22

      thanks

       
    • delefemiaoa

      delefemiaoa - 2016-06-22

      I can find the line to edit. Below is the file as seen in the configuration

      root@helpdesk:/var/www/itop/pages# vi UI.php
      // bottom: Displays the ticket details BEFORE the actions
      $oP->add('

      ');
      $oObj->DisplayBareProperties($oP);
      $oP->add('
      ');
      }
      $oP->add("
      \n");
      $oP->add("<form id="user-content-\"apply_stimulus\"" method="\"post\"" onsubmit="\"return" onsubmit('apply_stimulus');\"="">\n");
      $oP->add("
      \n");
      $oP->details($aDetails);
      $oP->add("
      \n");
      $oP->add("<input type="\"hidden\"" name="\"class\"" value="\"$sClass\"">\n");
      $oP->add("<input type="\"hidden\"" name="\"operation\"" value="\"bulk_apply_stimulus\"">\n");
      $oP->add("<input type="\"hidden\"" name="\"preview_mode\"" value="\"1\"">\n");
      $oP->add("<input type="\"hidden\"" name="\"filter\"" value="\"$sFilter\"">\n");
      $oP->add("<input type="\"hidden\"" name="\"stimulus\"" value="\"$sStimulus\"">\n");
      $oP->add("<input type="\"hidden\"" name="\"state\"" value="\"$sState\"">\n");
      $oP->add("<input type="\"hidden\"" name="\"transaction_id\"" value="\"".utils::GetNewTransactionId()."\"">\n");
      $oP->add($oAppContext->GetForForm());
      $oP->add("<input type="\"hidden\"" name="\"selectObject\"" value="\"".implode(',',$aSelectObject)."\"">\n");
      $in page of iTop
      *

      /**

      • Displays a popup welcome message, once per session at maximum
      • until the user unchecks the "Display welcome at startup"
      • @param WebPage $oP The current web page for the display
      • @return void
        */
        function DisplayWelcomePopup(WebPage $oP)
        {
        if (!isset($_SESSION['welcome']))
        {
        // Check, only once per session, if the popup should be displayed...
        // If the user did not already ask for hiding it forever
        $bPopup = appUserPreferences::GetPref('welcome_popup', true);
        if ($bPopup)
        {
        $sTemplate = @file_get_contents('../application/templates/welcome_popup.html');
        if ($sTemplate !== false)
        {
        $oTemplate = new DisplayTemplate($sTemplate);
        $oP->add("
        ");
        $oTemplate->Render($oP, array());
        $oP->add("

        <input type="\"checkbox\"" checked="" id="\"display_welcome_popup\"/"><label for="\"display_welcome_popup\""> ".Dict::S('UI:DisplayThisMessageAtStartup')."</label>

        \n");
        $oP->add("

        <input type="\"button\"" value="\"".Dict::S('UI:Button:Ok')."\"" onclick="\"$('#welcome_popup').dialog('close');\"/">\n");
        sURL = "./UI.php?operation=search&filter=".urlencode($sFilter)."&".$oAppContext->GetForLink();

      </form>
       
    • delefemiaoa

      delefemiaoa - 2016-06-23

      Please Denis can you help me with UI.php file content to do comparison with mine. Where I find $sLoginMessage = LoginWebPage::DoLogin(); is run_querry.php file. I am at a lost please do help me. it is highly critical.

       
  • delefemiaoa

    delefemiaoa - 2016-06-23

    Hi Denis,
    Where I can UI.php are listed below but the actual line you refered me to cannot be seen in these php files. What do I do please?

    /root/web/pages/UI.php
    /var/www/itop/pages/UI.php
    /var/www/html/itop/pages/UI.php

     
  • Denis

    Denis - 2016-06-23

    Which version of iTop are you using? The code is slightly different depending on the version.

     
    • delefemiaoa

      delefemiaoa - 2016-06-24

      iTop version 2.3.0-beta-2777 built on 2016-05-26 17:05:13
      Data model: 2.3.0
      MySQL: 5.5.49-0ubuntu0.14.04.1
      PHP: 5.5.9-1ubuntu4.17

       
  • delefemiaoa

    delefemiaoa - 2016-06-28

    Denis, thanks very much, I have to re install the itop since that is only option left for me.

     
  • IT 4 eva 2016

    IT 4 eva 2016 - 2016-07-05

    Hi, I am having this same problem and have tried what Denis suggests but I still get the user portal appearing and no chance to modify the admin profile. Is there anything else I can try?

     
  • sunny

    sunny - 2016-11-01

    delete portal user profile.

     

Log in to post a comment.

Auth0 Logo