remove getStarted from login

This commit is contained in:
Fernando Ontiveros
2025-04-14 17:32:23 +00:00
parent cfc74c33fd
commit a3b33a1b0f
13 changed files with 120 additions and 629 deletions

View File

@@ -175,9 +175,6 @@ $_SESSION["USERNAME_PREVIOUS2"] = $usernamePrevious2;
$_SESSION['NW_PASSWORD'] = $pass;
$_SESSION['NW_PASSWORD2'] = $pass1;
//translation
//$Translations = G::getModel("Translation");
//require_once "classes/model/Translation.php";
$Translations = new Translation();
$translationsTable = $Translations->getTranslationEnvironments();
@@ -214,51 +211,8 @@ $G_PUBLISH = new Publisher();
$version = explode('.', trim(file_get_contents(PATH_GULLIVER . 'VERSION')));
$version = isset($version[0]) ? intval($version[0]) : 0;
Cache::put("FAILED_LOGINS{$usernamePrevious2}", $sFailedLogins, 1800); //this value will be lost after 30 minutes
if ($version >= 3) {
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/loginpm3', '', $aFields, SYS_URI . 'login/authentication.php');
} else {
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/login', '', $aFields, SYS_URI . 'login/authentication.php');
}
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/login', '', $aFields, SYS_URI . 'login/authentication.php');
//get the serverconf singleton, and check if we can send the heartbeat
$oServerConf = ServerConf::getSingleton();
$partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false;
if (!$partnerFlag) {
$sflag = $oServerConf->getHeartbeatProperty('HB_OPTION', 'HEART_BEAT_CONF');
$sflag = (trim($sflag) != '') ? $sflag : '1';
//get date of next beat
$nextBeatDate = $oServerConf->getHeartbeatProperty('HB_NEXT_BEAT_DATE', 'HEART_BEAT_CONF');
//if flag to send heartbeat is enabled, and it is time to send heartbeat, sent it using asynchronous beat.
if (($sflag == "1") && ((strtotime("now") > $nextBeatDate) || is_null($nextBeatDate))) {
$oHeadPublisher = headPublisher::getSingleton();
//To do: we need to change to ExtJs
$oHeadPublisher->addScriptCode('var flagHeartBeat = 1;');
} else {
$oHeadPublisher->addScriptCode('var flagHeartBeat = 0;');
}
} else {
$oHeadPublisher->addScriptCode('var flagHeartBeat = 0;');
}
//check if we show the panel with the getting started info
require_once 'classes/model/Configuration.php';
$oConfiguration = new Configuration();
$oCriteria = new Criteria('workflow');
$oCriteria->add(ConfigurationPeer::CFG_UID, 'getStarted');
$oCriteria->add(ConfigurationPeer::OBJ_UID, '');
$oCriteria->add(ConfigurationPeer::CFG_VALUE, '1');
$oCriteria->add(ConfigurationPeer::PRO_UID, '');
$oCriteria->add(ConfigurationPeer::USR_UID, '');
$oCriteria->add(ConfigurationPeer::APP_UID, '');
$flagGettingStarted = ConfigurationPeer::doCount($oCriteria);
if ($flagGettingStarted == 0) {
$oHeadPublisher->addScriptCode('var flagGettingStarted = 1;');
} else {
$oHeadPublisher->addScriptCode('var flagGettingStarted = 0;');
}
$dummy = '';

View File

@@ -1,70 +0,0 @@
<?php
/**
* login_getStarted.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
$G_PUBLISH = new Publisher();
$fileGetStart = PATH_SKINS . SYS_SKIN . PATH_SEP . 'login_getStarted.html';
if (!file_exists($fileGetStart)) {
$fileGetStart = PATH_SKIN_ENGINE . SYS_SKIN . PATH_SEP . 'login_getStarted.html';
if (!file_exists($fileGetStart)) {
$fileGetStart = PATH_CUSTOM_SKINS . SYS_SKIN . PATH_SEP . 'login_getStarted.html';
if (!file_exists($fileGetStart)) {
$fileGetStart = PATH_TPL . 'services/login_getStarted.html';
}
}
}
$oTemplatePower = new TemplatePower( $fileGetStart );
$oTemplatePower->prepare();
/*
$oTemplatePower->newBlock('users');
$oTemplatePower->assign('USR_UID', $aUser['USR_UID']);
$oTemplatePower->assign('USR_FULLNAME', $aData['USR_FIRSTNAME'] . ' ' . $aData['USR_LASTNAME'] . ' (' . $aData['USR_USERNAME'] . ')');
*/
$userName = 'admin';
$userPass = "The password introduced at the time of installing the application. (If you did not change the password by default is $userName)";
if(isset($_SESSION['NW_PASSWORD'])){
if($_SESSION['NW_PASSWORD'] != ''){
$userPass = $_SESSION['NW_PASSWORD'];
}
}
require_once 'classes/model/Users.php';
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( UsersPeer::USR_USERNAME);
$oCriteria->add( UsersPeer::USR_UID, '00000000000000000000000000000001', Criteria::IN );
$oDataset = UsersPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$aData = array ();
if ($oDataset->next()) {
$aData = $oDataset->getRow();
$userName = $aData['USR_USERNAME'];
}
$oTemplatePower->assign("URL_MABORAK_JS", G::browserCacheFilesUrl("/js/maborak/core/maborak.js"));
$oTemplatePower->assign("name", $userName);
$oTemplatePower->assign("pass", $userPass);
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
G::RenderPage( 'publish', 'raw' );