/** * @param UserInterface $user * @return array */ public function serialize(UserInterface $user) { $serialized = ['user_id' => $user->getUserId(), 'email' => $user->getEmail(), 'name' => $user->getName()]; $signedUpAt = $user->getSignedUpAt(); if (null !== $signedUpAt) { $serialized['signed_up_at'] = $signedUpAt->getTimestamp(); } return $serialized; }
public function __construct() { parent::__construct(); $this->_authenticationRequired = false; $this->_moduleName = 'login'; $this->_moduleDirectory = 'login'; }
public function __construct() { parent::__construct(); $this->_authenticationRequired = false; $this->_moduleDirectory = 'graphs'; $this->_moduleName = 'graphs'; $this->_subTabs = array(); if (isset($_GET['width']) && $_GET['width'] < 2000) { $this->width = $_GET['width']; } else { $this->width = 300; } if (isset($_GET['height']) && $_GET['height'] < 1200) { $this->height = $_GET['height']; } else { $this->height = 200; } }
public function __construct() { parent::__construct(); $this->_authenticationRequired = false; $this->_moduleDirectory = 'wizard'; $this->_moduleName = 'wizard'; $this->_moduleTabText = ''; $this->_subTabs = array(); /* $this->addPage('Welcome!', './modules/wizard/WizardIntroIntro.tpl', '', false, true); $this->addPage('License', './modules/wizard/WizardIntroLicense.tpl', '', true, true); $this->addPage('Register', './modules/wizard/WizardIntroProf.tpl', '', false, true); $this->addPage('Setup Users', './modules/wizard/WizardIntroUsers.tpl', ' $users = new Users($siteID); $mp = $users->getAll(); $data = $users->getLicenseData(); $this->_template->assign(\'users\', $mp); $this->_template->assign(\'totalUsers\', $data[\'totalUsers\']); $this->_template->assign(\'userLicenses\', $data[\'userLicenses\']); $this->_template->assign(\'accessLevels\', $users->getAccessLevels()); '); $this->addPage('Localization', './modules/wizard/WizardIntroLocalization.tpl', ' $this->_template->assign(\'timeZone\', $_SESSION[\'CATS\']->getTimeZone()); $this->_template->assign(\'isDateDMY\', $_SESSION[\'CATS\']->isDateDMY()); '); $this->addJsInclude('./js/wizardIntro.js'); $this->setFinishURL('?m=home'); */ }
/** * It's called after the user record we are attached to is loaded. We read the privileges from the acl key of the * user object's parameters * * @return void */ public function onAfterLoad() { if (!empty($this->privileges)) { foreach ($this->privileges as $key => $value) { $this->privileges[$key] = $this->user->getParameters()->get('acl.' . $this->name . '.' . $key, $value); } } }
public function __construct() { parent::__construct(); $this->_authenticationRequired = false; $this->_moduleDirectory = 'install'; $this->_moduleName = 'install'; $this->_schema = CATSSchema::get(); }
public function __construct() { parent::__construct(); $this->_authenticationRequired = true; $this->_moduleDirectory = 'import'; $this->_moduleName = 'import'; $this->_subTabs = array(); }
public function __construct() { parent::__construct(); $this->_authenticationRequired = true; $this->_moduleDirectory = 'activity'; $this->_moduleName = 'activity'; $this->_moduleTabText = 'Activities'; }
public function __construct() { parent::__construct(); $this->_authenticationRequired = true; $this->_moduleDirectory = 'lists'; $this->_moduleName = 'lists'; $this->_moduleTabText = 'Lists'; $this->_subTabs = array('Show Lists' => CATSUtility::getIndexName() . '?m=lists'); }
public function __construct() { parent::__construct(); $this->_authenticationRequired = true; $this->_moduleDirectory = 'joborders'; $this->_moduleName = 'joborders'; $this->_moduleTabText = 'Job Orders'; $this->_subTabs = array('Add Job Order' => 'javascript:void(0);*js=showPopWin(\'' . CATSUtility::getIndexName() . '?m=joborders&a=addJobOrderPopup\', 400, 250, null);*al=' . ACCESS_LEVEL_EDIT, 'Search Job Orders' => CATSUtility::getIndexName() . '?m=joborders&a=search'); }
public function __construct() { parent::__construct(); $this->_authenticationRequired = true; $this->_moduleDirectory = 'calendar'; $this->_moduleName = 'calendar'; $this->_moduleTabText = 'Calendar'; $this->_subTabs = array('My Upcoming Events' => 'javascript:void(0);*js=calendarUpcomingEvents();', 'Add Event' => 'javascript:void(0);*js=userCalendarAddEvent();*al=' . ACCESS_LEVEL_EDIT, 'Goto Today' => 'javascript:void(0);*js=goToToday();'); }
public function __construct() { parent::__construct(); $this->_authenticationRequired = true; $this->_moduleDirectory = 'reports'; $this->_moduleName = 'reports'; $this->_moduleTabText = 'Reports'; $this->_subTabs = array('EEO Reports' => CATSUtility::getIndexName() . '?m=reports&a=customizeEEOReport', 'Custom Reports' => CATSUtility::getIndexName() . '?m=customizedReports'); }
public function __construct() { parent::__construct(); $this->_authenticationRequired = true; $this->_moduleDirectory = 'candidates'; $this->_moduleName = 'candidates'; $this->_moduleTabText = 'Candidates'; $this->_subTabs = array('Add Candidate' => CATSUtility::getIndexName() . '?m=candidates&a=add*al=' . ACCESS_LEVEL_EDIT, 'Import Candidates' => CATSUtility::getIndexName() . '?m=import&a=importSelectType&typeOfImport=Candidates', 'Import Resumes' => CATSUtility::getIndexName() . '?m=import&a=importSelectType&typeOfImport=resume', 'Search Candidates' => CATSUtility::getIndexName() . '?m=candidates&a=search'); }
public function __construct() { parent::__construct(); $this->_authenticationRequired = true; $this->_moduleDirectory = 'customizedReports'; $this->_moduleName = 'customizedReports'; $this->_moduleTabText = ''; $this->_subTabs = array(); }
public function __construct() { parent::__construct(); $this->_authenticationRequired = false; $this->_moduleDirectory = 'attachments'; $this->_moduleName = 'attachments'; $this->_moduleTabText = ''; $this->_subTabs = array(); }
public function __construct() { parent::__construct(); $this->_authenticationRequired = true; $this->_moduleDirectory = 'contacts'; $this->_moduleName = 'contacts'; $this->_moduleTabText = 'Contacts'; $this->_subTabs = array('Add Contact' => CATSUtility::getIndexName() . '?m=contacts&a=add*al=' . ACCESS_LEVEL_EDIT, 'Search Contacts' => CATSUtility::getIndexName() . '?m=contacts&a=search', 'Cold Call List' => CATSUtility::getIndexName() . '?m=contacts&a=showColdCallList'); }
public function __construct() { parent::__construct(); $this->_authenticationRequired = true; $this->_moduleDirectory = 'companies'; $this->_moduleName = 'companies'; $this->_moduleTabText = 'Companies'; $this->_subTabs = array('Add Company' => CATSUtility::getIndexName() . '?m=companies&a=add*al=' . ACCESS_LEVEL_EDIT . '*hrmode=0', 'Search Companies' => CATSUtility::getIndexName() . '?m=companies&a=search*hrmode=0', 'Go To My Company' => CATSUtility::getIndexName() . '?m=companies&a=internalPostings*hrmode=0'); }
public function __construct() { parent::__construct(); $this->_authenticationRequired = true; $this->_moduleDirectory = 'home'; $this->_moduleName = 'home'; $this->_moduleTabText = 'Dashboard'; $this->_subTabs = array(); }
public function __construct() { parent::__construct(); $this->_authenticationRequired = true; $this->_moduleName = 'tests'; $this->_moduleDirectory = 'tests'; $this->_unitTestCases = array(array('AddressParserTest', 'AddressParser Unit Tests'), array('AJAXInterfaceTest', 'AJAX Interface Unit Tests'), array('AttachmentsTest', 'Attachments Unit Tests'), array('ArrayUtilityTest', 'ArrayUtility Unit Tests'), array('BrowserDetectionTest', 'Browser Detection Unit Tests'), array('CalendarTest', 'Calendar Unit Tests'), array('DatabaseConnectionTest', 'DatabaseConnection Unit Tests'), array('DatabaseSearchTest', 'DatabaseSearch Unit Tests'), array('DateUtilityTest', 'DateUtility Unit Tests'), array('EmailTemplatesTest', 'EmailTemplates Unit Tests'), array('EncryptionTest', 'Encryption Unit Tests'), array('ExportTest', 'Export Unit Tests'), array('FileUtilityTest', 'FileUtility Unit Tests'), array('HashUtilityTest', 'HashUtility Unit Tests'), array('ResultSetUtilityTest', 'ResultSetUtility Unit Tests'), array('StringUtilityTest', 'StringUtility Unit Tests'), array('VCardTest', 'VCard Unit Tests')); $this->_systemTestCases = array(array('LoginWebTest', 'Login Module System Tests'), array('HomeWebTest', 'Home Module System Tests'), array('ActivitiesWebTest', 'Activities Module System Tests'), array('JobOrdersWebTest', 'Job Orders Module System Tests'), array('CandidatesWebTest', 'Candidates Module System Tests'), array('CompaniesWebTest', 'Companies Module System Tests'), array('ContactsWebTest', 'Contacts Module System Tests'), array('ReportsWebTest', 'Reports Module System Tests'), array('CalendarWebTest', 'Calendar Module System Tests'), array('SettingsWebTest', 'Settings Module System Tests')); $this->_AJAXTestCases = array(array('ActivityTest', 'Activity AJAX Tests'), array('GetCompanyContactsTest', 'GetCompanyContacts AJAX Tests'), array('GetCompanyLocationTest', 'GetCompanyLocation AJAX Tests'), array('GetCompanyLocationAndDepartmentsTest', 'GetCompanyLocationAndDepartments AJAX Tests'), array('GetCompanyNamesTest', 'GetCompanyNames AJAX Tests'), array('GetDataItemJobOrdersTest', 'GetDataItemJobOrders AJAX Tests'), array('GetParsedAddressTest', 'GetParsedAddress AJAX Tests'), array('GetPipelineDetailsTest', 'GetPipelineDetails AJAX Tests'), array('GetPipelineJobOrderTest', 'GetPipelineJobOrder AJAX Tests'), array('SetCandidateJobOrderRatingTest', 'SetCandidateJobOrderRating AJAX Tests'), array('TestEmailSettingsTest', 'TestEmailSettings AJAX Tests'), array('ZipLookupTest', 'ZipLookup AJAX Tests')); }
public function dashboard() { $state = $this->state->Get($this->StateStorage); $p = $_GET['p']; $function_link = '?p=' . $p . '&f='; $power = $this->triggers['togglepower']; $return = UserInterface::Button($power['btn_label'], $function_link . 'togglepower', $power['btn_class']); //Volume Pan $return .= UserInterface::Slider("VolumePan", $function_link . "setvolume&vol=", "Volume", $state['volume'], $this->volume['max']); //Input Source $source = $this->triggers['set_source_toggle']; $return .= UserInterface::Button($source['btn_label'], $function_link . 'set_source_toggle', $source['btn_class']); return $return; }
public function __construct() { parent::__construct(); $this->_authenticationRequired = true; $this->_moduleDirectory = 'lists'; $this->_moduleName = 'lists'; $this->_moduleTabText = 'Lists'; $this->_subTabs = array( 'Show Lists' => CATSUtility::getIndexName() . '?m=lists' /* 'New Static List' => CATSUtility::getIndexName() . '?m=lists&a=newListStatic*al=' . ACCESS_LEVEL_EDIT, */ /* 'New Dynamic List' => CATSUtility::getIndexName() . '?m=lists&a=newListDynamic*al=' . ACCESS_LEVEL_EDIT */ ); }
public static function delete($title) { $userId = Auth::getUserId(); // First remove all widget of this tabs // Get the list of widgets of this tab $installedWidgetList = UserInterface::retrieve(Auth::getUserId(), 'raw', $title); $cleanResTable = array(); foreach ($installedWidgetList as $widgetInfo) { $widgetInstanceId = $widgetInfo['widgetInstanceId']; UserInterface::deleteWidget($userId, $widgetInstanceId, array()); } // Next Delete the tab in tab table echo json_encode(Tabs::deleteTab($userId, $title)); exit(0); }
/** * @todo display states * @return type */ public function dashboard() { $state = $this->state->Get('AVR'); $p = $_GET['p']; if (isset($state['source'])) { $current_function = $this->getFunctionByLabel($state['source']); } else { $current_function = ""; } $function_link = '?p=' . $p . '&f='; //Power Button $power = $this->triggers['togglepower']; $return = UserInterface::Button($power['btn_label'], $function_link . 'togglepower', $power['btn_class']); //Volume $volumes = $this->getTriggersByGroup('Volume'); $volumes_group = ""; foreach ($volumes as $function => $settings) { $volumes_group .= UserInterface::Button($settings['btn_label'], $function_link . $function, $settings['btn_class']); } $return .= UserInterface::Group('AVR_Volume', $volumes_group); //Volume Pan $return .= UserInterface::Slider("VolumePan", $function_link . "setvolume&vol=", "Volume", $state['volume'], 80); //Sources $sources = $this->getTriggersByGroup('Source'); $SourcesList = array(); foreach ($sources as $function => $settings) { $SourcesList[$function] = UserInterface::Button($settings['btn_label'], $function_link . $function, $settings['btn_class']); } $return .= UserInterface::Dropdown('Source', $SourcesList, 'Sources', 'function-btn icon', $current_function); // Audio Mode $audiomode = $this->triggers['set_audiomode']; $return .= UserInterface::Button($audiomode['btn_label'], $function_link . 'set_audiomode', $audiomode['btn_class']); // Audio Level Control $alc = $this->triggers['set_alc_toggle']; $return .= UserInterface::Button($alc['btn_label'], $function_link . 'set_alc_toggle', $alc['btn_class']); // Surround $surround = $this->triggers['set_advance_surround']; $return .= UserInterface::Button($surround['btn_label'], $function_link . 'set_advance_surround', $surround['btn_class']); //Subwoofer Button $subwoofer = $this->triggers['power_subwoofer']; $return .= UserInterface::Button($subwoofer['btn_label'], $function_link . 'power_subwoofer', $subwoofer['btn_class']); return $return; }
/** * Initialize this interface * @param array $arguments Commandline arguments * @param \Cx\Core\Core\Controller\Cx $cx Contrexx main class */ public function __construct($arguments, $cx) { parent::__construct($cx); $command = 'help'; if (isset($arguments[1])) { $command = $arguments[1]; } if ($command == 'help') { if (isset($arguments[2])) { if ($this->commandExists($arguments[2])) { $command = $this->getCommand($arguments[2]); echo 'Command `' . $command->getName() . "`\r\n" . $command->getDescription() . "\r\n\r\n" . $command->getSynopsis() . "\r\n\r\n" . $command->getHelp() . "\r\n"; exit; } else { echo 'No such subcommand, read the list:' . "\r\n\r\n"; } } $this->showHelp(); } else { if ($command == 'moo') { $this->showFlag(); } else { if ($this->commandExists($command)) { try { $this->getCommand($command)->execute($arguments); } catch (\Cx\Core_Modules\Workbench\Model\Entity\CommandException $e) { echo 'Command failed: ' . $e->getMessage(); } catch (\Exception $e) { echo 'FATAL: ' . $e->getMessage(); } } else { $this->showHelp(); } } } echo "\r\n"; }
public function dashboard() { $state = $this->state->Get($this->StateStorage); $p = $_GET['p']; $function_link = '?p=' . $p . '&f='; $power = $this->triggers['togglepower']; $return = UserInterface::Button($power['btn_label'], $function_link . 'togglepower', $power['btn_class']); //Volume Pan $return .= UserInterface::Slider("VolumePan", $function_link . "setvolume&vol=", "Volume", $state['volume'], $this->volume['max']); $volumes = $this->getTriggersByGroup('tv-channel'); $volumes_group = ""; foreach ($volumes as $function => $settings) { $volumes_group .= UserInterface::Button($settings['btn_label'], $function_link . $function, $settings['btn_class']); } $return .= UserInterface::Group('tv_channel', $volumes_group); //Volume $channels = $this->getTriggersByGroup('tv-channel-input'); $channel_group = ""; foreach ($channels as $function => $settings) { $channel_group .= UserInterface::Button($settings['btn_label'], $function_link . $function, $settings['btn_class']); } $return .= UserInterface::Group('tv-channel-inputs', $channel_group); return $return; }
/** * Send an email to a user to confirm the account creation * * @param UserInterface $user * * @return void */ public function sendRecoveryPasswordConfirmation($user) { $templateName = 'CoreBundle:Email:validate.new.password.html.twig'; $context = array('name' => $user->getName()); $this->sendMessage($templateName, $context, $this->parameters['company']['email'], $user->getEmail()); }
/** * {@inheritDoc} */ public function equals(UserInterface $user) { if (!$user instanceof User) { return false; } if ($this->password !== $user->getPassword()) { return false; } if ($this->getSalt() !== $user->getSalt()) { return false; } if ($this->username !== $user->getUsername()) { return false; } if ($this->accountNonExpired !== $user->isAccountNonExpired()) { return false; } if ($this->accountNonLocked !== $user->isAccountNonLocked()) { return false; } if ($this->credentialsNonExpired !== $user->isCredentialsNonExpired()) { return false; } if ($this->enabled !== $user->isEnabled()) { return false; } return true; }
<?php # Pitchfork authentication page # Include the UI Processor... include 'includes/pitchfork-class-interface.php'; $auth_UI = new UserInterface(); $auth_UI->set_page_title("Login"); $auth_UI->load_header(); if ($_REQUEST['access'] == 'denied') { $auth_UI->special = $auth_UI->load('password-wrong', false); } else { $auth_UI->special = $auth_UI->load('password-prompt', false); } $auth_UI->load('prompt-login'); $auth_UI->load_footer(); $auth_UI->return_UI(); # Part of Pitchfork.
private function onEmailSettings() { if ($this->_realAccessLevel < ACCESS_LEVEL_SA) { CommonErrors::fatal(COMMONERROR_PERMISSION, $this); return; //$this->fatal(ERROR_NO_PERMISSION); } $mailerSettings = new MailerSettings($this->_siteID); $mailerSettingsRS = $mailerSettings->getAll(); foreach ($mailerSettingsRS as $setting => $value) { if (isset($_POST[$setting])) { $mailerSettings->set($setting, $_POST[$setting]); } } $candidateJoborderStatusSendsMessage = unserialize($mailerSettingsRS['candidateJoborderStatusSendsMessage']); $candidateJoborderStatusSendsMessage[PIPELINE_STATUS_CONTACTED] = UserInterface::isChecked('statusChangeContacted', $_POST) ? 1 : 0; $candidateJoborderStatusSendsMessage[PIPELINE_STATUS_CANDIDATE_REPLIED] = UserInterface::isChecked('statusChangeReplied', $_POST) ? 1 : 0; $candidateJoborderStatusSendsMessage[PIPELINE_STATUS_QUALIFYING] = UserInterface::isChecked('statusChangeQualifying', $_POST) ? 1 : 0; $candidateJoborderStatusSendsMessage[PIPELINE_STATUS_SUBMITTED] = UserInterface::isChecked('statusChangeSubmitted', $_POST) ? 1 : 0; $candidateJoborderStatusSendsMessage[PIPELINE_STATUS_INTERVIEWING] = UserInterface::isChecked('statusChangeInterviewing', $_POST) ? 1 : 0; $candidateJoborderStatusSendsMessage[PIPELINE_STATUS_OFFERED] = UserInterface::isChecked('statusChangeOffered', $_POST) ? 1 : 0; $candidateJoborderStatusSendsMessage[PIPELINE_STATUS_CLIENTDECLINED] = UserInterface::isChecked('statusChangeDeclined', $_POST) ? 1 : 0; $candidateJoborderStatusSendsMessage[PIPELINE_STATUS_PLACED] = UserInterface::isChecked('statusChangePlaced', $_POST) ? 1 : 0; $mailerSettings->set('candidateJoborderStatusSendsMessage', serialize($candidateJoborderStatusSendsMessage)); $emailTemplates = new EmailTemplates($this->_siteID); $emailTemplatesRS = $emailTemplates->getAll(); foreach ($emailTemplatesRS as $index => $data) { $emailTemplates->updateIsActive($data['emailTemplateID'], UserInterface::isChecked('useThisTemplate' . $data['emailTemplateID'], $_POST) ? 0 : 1); } $this->_template->assign('active', $this); CATSUtility::transferRelativeURI('m=settings&a=administration'); }
/** * Validate a user against the given credentials. * * @param \Illuminate\Security\UserInterface $user * @param array $credentials * @return bool */ public function validateCredentials(UserInterface $user, array $credentials) { $plain = $credentials['password']; return $this->hasher->check($plain, $user->getAuthPassword()); }