handleSignup *******************************************************
553739
function handleUserMe(req, res, next) {
		Promise.resolve(req.locals.user || {})
		.then(function (me) {
			debug(`Handling user/me request for ${me.display_name}.`);
			res.json({
				me
			});
			next();
		}).catch(function (err) {
			debug(`Error during user/me request`, err);
			next(err);
		});
	}
1128857
private function handleInputNameForEditAll()
    {
        if (('select' !== $this->getEnvironment()->getInputProvider()->getParameter('act'))
            && ('edit' !== $this->getEnvironment()->getInputProvider()->getParameter('select'))
            && ('edit' !== $this->getEnvironment()->getInputProvider()->getParameter('mode'))
        ) {
            return;
        }

        $tableName      = \explode('____', $this->getEnvironment()->getInputProvider()->getValue('name'))[0];
        $sessionKey     = 'DC_GENERAL_' . \strtoupper($tableName);
        $sessionStorage =
            System::getContainer()->get('cca.dc-general.session_factory')->createService()->setScope($sessionKey);

        $selectAction = $this->getEnvironment()->getInputProvider()->getParameter('select');

        $session = $sessionStorage->get($tableName . '.' . $selectAction);

        $originalPropertyName = null;
        foreach ((array) $session['models'] as $modelId) {
            if (null !== $originalPropertyName) {
                break;
            }

            $propertyNamePrefix = \str_replace('::', '____', $modelId) . '_';
            if (0 !== strpos($this->strName, $propertyNamePrefix)) {
                continue;
            }

            $originalPropertyName = \substr($this->strName, \strlen($propertyNamePrefix));
        }

        if (!$originalPropertyName) {
            return;
        }

        $this->arrConfiguration['originalField'] = $originalPropertyName;

        $this->strName = $propertyNamePrefix . '[' . $originalPropertyName . ']';
    }
863079
function processIgnores (visitor) {
    for (const ignorePattern of options.ignores) {
      const key = `${ignorePattern}:exit`

      if (visitor.hasOwnProperty(key)) {
        const handler = visitor[key]
        visitor[key] = function (node) {
          const ret = handler.apply(this, arguments)
          ignore(node)
          return ret
        }
      } else {
        visitor[key] = ignore
      }
    }

    return visitor
  }
1208006
function handleOut (ui, out) {

    if (out.options) {
        Object.keys(out.options).forEach(function (key) {
            ui.options = ui.options.set(key, out.options[key]);
        });
    }

    if (out.optionsIn) {
        out.optionsIn.forEach(function (item) {
            ui.options = ui.options.setIn(item.path, item.value);
        });
    }

    if (out.instance) {
        Object.keys(out.instance).forEach(function (key) {
            ui[key] = out.instance[key];
        });
    }
}
1313194
protected function handlePOST()
    {
        $oldPassword = $this->getPayloadData('old_password');
        $newPassword = $this->getPayloadData('new_password');
        $login = $this->request->getParameterAsBool('login');

        if (!empty($oldPassword) && Session::isAuthenticated()) {
            $user = Session::user();

            return static::changePassword($user, $oldPassword, $newPassword, $login);
        }

        $email = $this->getPayloadData('email');
        $username = $this->getPayloadData('username');
        $code = $this->getPayloadData('code');
        $answer = $this->getPayloadData('security_answer');
        $loginAttribute = strtolower(config('df.login_attribute', 'email'));

        if ($this->request->getParameterAsBool('reset')) {
            if ($loginAttribute === 'username') {
                return $this->passwordResetWithUsername($username);
            }

            return $this->passwordReset($email);
        }

        if (!empty($code)) {
            if ($loginAttribute === 'username') {
                return static::changePasswordByCodeWithUsername($username, $code, $newPassword, $login);
            }

            return static::changePasswordByCode($email, $code, $newPassword, $login);
        }

        if (!empty($answer)) {
            if ($loginAttribute === 'username') {
                return static::changePasswordBySecurityAnswerWithUsername($username, $answer, $newPassword, $login);
            }

            return static::changePasswordBySecurityAnswer($email, $answer, $newPassword, $login);
        }

        throw new BadRequestException('Not enough information provided to change password.');
    }
312558
public void handleSubmit(I_CmsFormSubmitHandler handler) {

        Map<String, String> values = collectValues();
        Set<String> editedFields = new HashSet<String>(getEditedFields());
        editedFields.retainAll(values.keySet());
        handler.onSubmitForm(this, values, editedFields);
    }
469454
function handleCipherSuccess(opts, err) {
  console.log(chalk.green(
    '\nSuccess: ' + opts.input + ' → ' + opts.output + '\n'
  ));
}
903781
public function exec(): void
    {
        if (Application::route()->isAjax()) {
            // if is ajax
            $this->handleExceptionInAjax($this->e);
        } else {
            // normal request
            $this->handleExceptionInNormalRequest($this->e);
        }
    }
549862
public function handleAddDir(): void
	{
		if ($this->presenter->isAjax() && $this->editable) {
			$files = $this->getFiles();
			$dirName = $this->generateName('newDir');
			mkdir($this->getFullPath($dirName));
			array_unshift($files, $this->rename($dirName));
			$this->template->files = $files;
			$this->redrawControl();
		} else {
			exit;
		}
	}
711546
public function __HANDLER()
    {
        // Create query to get users
        $query = dbQuery('user')->Active(1)->order_by('UserID');

        // Create generic table for users
        $table = new Table($query);

        // Установим представление
        m()->view('main/index')->title(t('Пользователи системы', true))
            ->all_materials(true)
            // Установим шаблон таблицы пользователей
            ->user_table($table->render());
    }
847607
public function handle()
    {

        if (! $this->preflighted()) return;

        // A list of column => query to retrieve character_ids for
        // affiliation lookup. If no constraint is needed to get
        // only character_ids, new instances of the model classes
        // are used.
        $queries = collect([
            'first_party_id'  => CharacterWalletJournal::join('universe_names',
                'first_party_id', '=', 'entity_id')->where('category', 'character')->select('first_party_id'),
            'second_party_id' => CharacterWalletJournal::join('universe_names',
                'second_party_id', '=', 'entity_id')->where('category', 'character')->select('second_party_id'),
            'client_id'       => CharacterWalletTransaction::whereBetween('client_id', [3000000, 4000000])
                ->orWhereBetween('client_id', [90000000, 98000000])
                ->select('client_id'),
            'contact_id'      => CharacterContact::where('contact_type', 'character'),
            'issuer_id'       => (new ContractDetail),
            'character_id'    => (new MailHeader),
            'from'            => MailHeader::whereBetween('from', [3000000, 4000000])
                ->orWhereBetween('from', [90000000, 98000000])
                ->select('from'),
            'recipient_id'    => MailRecipient::where('recipient_type', 'character'),
            'sender_id'       => CharacterNotification::where('sender_type', 'character'),
        ]);

        $queries->each(function ($query, $column) {

            // Add the results of the query to the current character_ids
            $this->character_ids->push($query->whereNotNull($column)->distinct()->pluck($column)->all());

            // Ensure the character_ids collection is flat and unique
            $this->character_ids = $this->character_ids->flatten()->unique();
        });

        // Perform the affiliation updates for all of the unique character_ids
        $this->character_ids->chunk($this->item_id_limit)->each(function ($chunk) {

            $this->request_body = $chunk->values()->all();
            $affiliations = $this->retrieve();

            collect($affiliations)->chunk(1000)->each(function ($affiliation_chunk) {

                $records = $affiliation_chunk->map(function ($affiliation) {
                    return [
                        'character_id'   => $affiliation->character_id,
                        'corporation_id' => $affiliation->corporation_id,
                        'alliance_id'    => $affiliation->alliance_id ?? null,
                        'faction_id'     => $affiliation->faction_id ?? null,
                        'created_at'     => carbon(),
                        'updated_at'     => carbon(),
                    ];
                });

                CharacterAffiliation::upsert($records->toArray(), [
                    'character_id',
                    'corporation_id',
                    'alliance_id',
                    'faction_id',
                    'updated_at',
                ]);
            });
        });
    }
1303088
protected function handleItself()
    {
        if ($this->isMoved($this->event)) {
            if ($this->getResource()->exists() && $this->addWatch() === $this->id) {
                return;
            }

            $this->unwatch($this->id);
        }

        if ($this->getResource()->exists()) {
            if ($this->isIgnored($this->event) || $this->isMoved($this->event) || !$this->id) {
                $this->setEvent($this->id ? IN_MODIFY : IN_CREATE);
                $this->watch();
            }
        } elseif ($this->id) {
            $this->event = IN_DELETE;
            $this->getBag()->remove($this);
            $this->unwatch($this->id);
            $this->id = null;
        }
    }
483622
protected function handleSignals(): void
    {
        foreach ([SIGTERM, SIGQUIT, SIGABRT, SIGINT] as $signal) {
            pcntl_signal($signal, function ($signal) {
                $this->terminate($signal);
            });
        }
    }
1337957
function handleInput(input) {

    /*!
     * Display help
     */

    if (!input || input === '-h' || input === '--help') {
        help();
        process.exit();
    }

    /*!
     * Display version
     */

    if (input === '-v' || input === '--version') {
        version();
        process.exit();
    }

    /*!
     * Render the QR Code
     */

    qrcode.generate(input);
}
449929
protected function processToken(): void
    {
        if (!(($this->nextIsWhitespace) && ($this->prevIsWhitespace))) {
            $error = new CodeError(
                static::CODE_MISSING_SPACE_AROUND_CONCAT,
                self::MESSAGE_MISSING_SPACE_AROUND_CONCAT,
                $this->stackPos
            );

            $error->isFixable(true);

            throw $error;
        }
    }
720808
protected function ProcessNewsletterSignup()
    {
        $this->LoadNewsletterSignup();
        $bContinue = true;
        $oMsgManager = TCMSMessageManager::GetInstance();
        // validate data...
        $aRequiredFields = $this->oNewsletterSignup->GetRequiredFields();
        if (!is_array($this->oNewsletterSignup->sqlData)) {
            $this->oNewsletterSignup->sqlData = array();
        }
        foreach ($aRequiredFields as $sFieldName) {
            $sVal = '';
            if (array_key_exists($sFieldName, $this->oNewsletterSignup->sqlData)) {
                $sVal = trim($this->oNewsletterSignup->sqlData[$sFieldName]);
            }
            if (empty($sVal)) {
                $oMsgManager->AddMessage(self::INPUT_DATA_NAME.'-'.$sFieldName, 'ERROR-USER-REQUIRED-FIELD-MISSING');
                $bContinue = false;
            } else {
                $this->oNewsletterSignup->sqlData[$sFieldName] = $sVal;
            }
        }

        // check format for email field
        if (!empty($this->oNewsletterSignup->fieldEmail) && !TTools::IsValidEMail($this->oNewsletterSignup->fieldEmail)) {
            $oMsgManager->AddMessage(self::INPUT_DATA_NAME.'-email', 'ERROR-E-MAIL-INVALID-INPUT');
            $bContinue = false;
        }

        if ($bContinue) {
            // check email
            if ($this->oNewsletterSignup->EMailAlreadyRegistered()) {
                // someone else has this email...
                $oMsgManager->AddMessage(self::INPUT_DATA_NAME.'-'.$sFieldName, 'ERROR-E-MAIL-ALREADY-REGISTERED');
                $bContinue = false;
            }
        }

        if ($bContinue) {
            // save!
            $this->oNewsletterSignup->AllowEditByAll(true);
            $this->oNewsletterSignup->Save();
            if (empty($this->oNewsletterSignup->sqlData['optin'])) {
                $this->oNewsletterSignup->SendDoubleOptInEMail();
            }
        }

        return $bContinue;
    }
56754
function handlePermissionUpdate() {
            permissionArea.find("form").submit(function (e) {
                e.preventDefault();
                //console.log(e);
                var form = e.currentTarget;
                appendFormFields(form);
                Rocket.Util.submitFormAsync(form, function (responseData) {
                    //console.log(responseData);
                    if (responseData && responseData.status && responseData.status == "success") {
                        location.reload();
                    }
                });
            });
        }