• Модуль: security
  • Путь к файлу: ~/bitrix/modules/security/lib/mfa/otp.php
  • Класс: BitrixSecurityMfaOtp
  • Вызов: Otp::setUserInfo
public function setUserInfo(array $userInfo)
{
	$this->setActive($userInfo['ACTIVE']);
	$this->setUserActive($userInfo['USER_ACTIVE']);
	$this->setUserId($userInfo['USER_ID']);
	$this->setAttempts($userInfo['ATTEMPTS']);
	$this->setSecret($userInfo['SECRET']);
	$this->setParams($userInfo['PARAMS']);
	$this->setSkipMandatory($userInfo['SKIP_MANDATORY']);

	// Old users haven't INITIAL_DATE and DEACTIVATE_UNTIL
	// ToDo: maybe it's not the best approach, think about it later
	if ($userInfo['INITIAL_DATE'])
		$this->setInitialDate($userInfo['INITIAL_DATE']);

	if ($userInfo['DEACTIVATE_UNTIL'])
		$this->setDeactivateUntil($userInfo['DEACTIVATE_UNTIL']);

	return $this;
}