Register the given user activity.

@param int         $authyId
@param string      $type
@param string      $data
@param string|null $ip

@return \Rinvex\Authy\Response
335904
public function registerActivity($authyId, $type, $data, $ip = null): Response
    {
        // Prepare required variables
        $url = $this->api."users/{$authyId}/register_activity";
        $params = $this->params + ['form_params' => ['type' => $type, 'data' => $data, 'user_ip' => $ip]];

        // Register Authy user activity, and return response
        return new Response($this->http->post($url, $params));
    }
523869
public function registerManaged($entity, array $id, array $data)
    {
        $oid = spl_object_hash($entity);

        $this->entityIdentifiers[$oid]  = $id;
        $this->entityStates[$oid]       = self::STATE_MANAGED;
        $this->originalEntityData[$oid] = $data;

        $this->addToIdentityMap($entity);

        if ($entity instanceof NotifyPropertyChanged && ( ! $entity instanceof Proxy || $entity->__isInitialized())) {
            $entity->addPropertyChangedListener($this);
        }
    }
1234211
async def _async_register(self):  # pragma: no cover
        
        metadata = aioxmpp.make_security_layer(None, no_verify=not self.verify_security)
        query = ibr.Query(self.jid.localpart, self.password)
        _, stream, features = await aioxmpp.node.connect_xmlstream(self.jid, metadata, loop=self.loop)
        await ibr.register(stream, query)
929867
function registerType($typeIdentifier, \Plasma\Types\TypeExtensionInterface $type): void {
        if(isset($this->regularTypes[$typeIdentifier]) || isset($this->classTypes[$typeIdentifier])) {
            throw new \Plasma\Exception('Type identifier is already in use');
        }
        
        if(\in_array($typeIdentifier, static::PHP_TYPES, true)) {
            $this->regularTypes[$typeIdentifier] = $type;
        } else {
            $this->classTypes[$typeIdentifier] = $type;
        }
    }
958074
public function addRegister($sUserId, $sResult)
    {
        $this->_registerUser = md5($sUserId);
        $this->_registerResult = $sResult;
    }
463037
public void register() throws IOException {
    try {
      registeredPrefixId = face.registerPrefix(prefix, this, new OnRegisterFailed() {
        @Override
        public void onRegisterFailed(Name prefix) {
          registeredPrefixId = UNREGISTERED;
          logger.log(Level.SEVERE, "Failed to register prefix: " + prefix.toUri());
        }
      }, new ForwardingFlags());
      logger.log(Level.FINER, "Registered a new prefix: " + prefix.toUri());
    } catch (net.named_data.jndn.security.SecurityException e) {
      throw new IOException("Failed to communicate to face due to security error", e);
    }
  }
481858
public function register($pid, ConnectionInterface $connection)
    {
        if ($this->status !== self::CREATED) {
            throw new \LogicException('Cannot register a slave that is not in created state');
        }

        $this->pid = $pid;
        $this->connection = $connection;

        $this->status = self::REGISTERED;
    }
1038205
public function addData($data, $type = self::TYPE_NOTES)
	{
		$type 			= $this->amoType($type);
		$link				='https://' . $this->subdomain . '.amocrm.ru/private/api/v2/json/' . $type . '/set';
		$postFields = json_encode($data);
		$result 		= $this->useCurl($link, $postFields, self::HTTP_HEADER);
		return $result;
	}
547300
public function register(MW_Observer_Publisher_Interface $publisher, $domain)
	{
		if( !empty( $this->_plugins ) )
		{
			foreach( $this->_plugins as $plugin ) {
				$plugin->register( $publisher );
			}

			return;
		}

		$search = $this->createSearch( true );

		$expr = array(
			$search->compare( '==', 'plugin.type.code', $domain ),
			$search->getConditions(),
		);

		$search->setConditions( $search->combine( '&&', $expr ) );
		$search->setSortations( array( $search->sort( '+', 'plugin.position' ) ) );

		$pluginItems = $this->searchItems( $search );

		$interface = 'MShop_Plugin_Provider_Interface';
		$context = $this->_getContext();

		foreach( $pluginItems as $pluginItem )
		{
			$domain = $pluginItem->getType();
			$providernames = explode( ',', $pluginItem->getProvider() );

			if( ( $providername = array_shift( $providernames ) ) === null )
			{
				$msg = sprintf( 'Provider in "%1$s" not available', $providernames );
				throw new MShop_Service_Exception( $msg );
			}

			if( ctype_alnum( $domain ) === false )
			{
				$msg = sprintf( 'Invalid characters in domain name "%1$s"', $domain );
				$context->getLogger()->log( $msg, MW_Logger_Abstract::WARN );
				continue;
			}

			if( ctype_alnum( $providername ) === false )
			{
				$msg = sprintf( 'Invalid characters in provider name "%1$s"', $providername );
				$context->getLogger()->log( $msg, MW_Logger_Abstract::WARN );
				continue;
			}


			$classname = 'MShop_Plugin_Provider_' . ucfirst( $domain ) . '_' . $providername;

			if( class_exists( $classname ) === false )
			{
				$msg = sprintf( 'Class "%1$s" not available', $classname );
				$context->getLogger()->log( $msg, MW_Logger_Abstract::WARN );
				continue;
			}

			$provider = new $classname( $context, $pluginItem );

			if( ( $provider instanceof $interface ) === false )
			{
				$msg = sprintf( 'Class "%1$s" does not implement interface "%2$s"', $classname, $interface );
				throw new MShop_Service_Exception( $msg );
			}


			$provider = $this->_addPluginDecorators( $pluginItem, $provider, $providernames );

			$config = $context->getConfig();
			$decorators = $config->get( 'mshop/plugin/provider/' . $pluginItem->getType() . '/decorators', array() );

			$provider = $this->_addPluginDecorators( $pluginItem, $provider, $decorators );


			$this->_plugins[$pluginItem->getId()] = $provider;
			$provider->register( $publisher );
		}
	}
1105826
public function registerAction(ServerRequestInterface $request, Tree $tree): ResponseInterface
    {
        $this->checkRegistrationAllowed();

        $comments = $request->get('comments', '');
        $email    = $request->get('email', '');
        $password = $request->get('password', '');
        $realname = $request->get('realname', '');
        $username = $request->get('username', '');

        try {
            $this->doValidateRegistration($username, $email, $realname, $comments, $password);
        } catch (Exception $ex) {
            FlashMessages::addMessage($ex->getMessage(), 'danger');

            return redirect(route('register', [
                'comments' => $comments,
                'email'    => $email,
                'realname' => $realname,
                'username' => $username,
            ]));
        }

        Log::addAuthenticationLog('User registration requested for: ' . $username);

        $user = $this->user_service->create($username, $realname, $email, $password);
        $user
            ->setPreference('language', WT_LOCALE)
            ->setPreference('verified', '0')
            ->setPreference('verified_by_admin', '0')
            ->setPreference('reg_timestamp', date('U'))
            ->setPreference('reg_hashcode', md5(Uuid::uuid4()->toString()))
            ->setPreference('contactmethod', 'messaging2')
            ->setPreference('comment', $comments)
            ->setPreference('visibleonline', '1')
            ->setPreference('auto_accept', '0')
            ->setPreference('canadmin', '0')
            ->setPreference('sessiontime', '0');

        // Send a verification message to the user.
        /* I18N: %s is a server name/URL */
        Mail::send(
            new TreeUser($tree),
            $user,
            new TreeUser($tree),
            I18N::translate('Your registration at %s', WT_BASE_URL),
            view('emails/register-user-text', ['user' => $user]),
            view('emails/register-user-html', ['user' => $user])
        );

        // Tell the genealogy contact about the registration.
        $webmaster = $this->user_service->find((int) $tree->getPreference('WEBMASTER_USER_ID'));

        if ($webmaster !== null) {
            I18N::init($webmaster->getPreference('language'));

            /* I18N: %s is a server name/URL */
            $subject = I18N::translate('New registration at %s', $tree->title());

            /* I18N: %s is a server name/URL */
            Mail::send(
                new TreeUser($tree),
                $webmaster,
                $user,
                $subject,
                view('emails/register-notify-text', ['user' => $user, 'comments' => $comments]),
                view('emails/register-notify-html', ['user' => $user, 'comments' => $comments])
            );

            $mail1_method = $webmaster->getPreference('contact_method');
            if ($mail1_method !== 'messaging3' && $mail1_method !== 'mailto' && $mail1_method !== 'none') {
                DB::table('message')->insert([
                    'sender'     => $user->email(),
                    'ip_address' => $request->getClientIp(),
                    'user_id'    => $webmaster->id(),
                    'subject'    => $subject,
                    'body'       => view('emails/register-notify-text', ['user' => $user, 'comments' => $comments]),
                ]);
            }
        }

        $title = I18N::translate('Request a new user account');

        return $this->viewResponse('register-success-page', [
            'title' => $title,
            'user'  => $user,
        ]);
    }
327716
public function createDefaultBlock($type = null, array $data = [], EM\RowInterface $row = null)
    {
        return $this->getBlockManager()->create($row, $type, $data);
    }
1286661
public void bindEip(String eip, String instanceId, String instanceType) {
        this.bindEip(new BindEipRequest().withEip(eip).withInstanceId(instanceId).withInstanceType(instanceType));
    }
413195
public function Register($data)
    {
        // If we have passed a confirm password field, clean the
        // data
        if (isset($data["Password"]) && is_array($data["Password"]) && isset($data["Password"]["_Password"])) {
            $data["Password"] = $data["Password"]["_Password"];
        }
        
        $this->owner->update($data);

        // Set verification code for this user
        $this->owner->VerificationCode = sha1(mt_rand() . mt_rand());
        $this->owner->write();

        // Add member to any groups that have been specified
        if (count(Users::config()->new_user_groups)) {
            $groups = Group::get()->filter(
                array(
                "Code" => Users::config()->new_user_groups
                )
            );

            foreach ($groups as $group) {
                $group->Members()->add($this->owner);
                $group->write();
            }
        }

        // Send a verification email, if needed
        if (Users::config()->send_verification_email) {
            $this->owner->sendVerificationEmail();
        }

        // Login (if enabled)
        if (Users::config()->login_after_register) {
            $this->owner->LogIn(isset($data['Remember']));
        }

        return $this->owner;
    }
282519
public static function send($eventKey, array $data, $ip = "0.0.0.0")
    {

        $id = self::getId($ip);
        $ventData = [
            '_id'       => $id,
            'eventKey'  => $eventKey,
            'data'      => $data,
            'ip'        => $ip,
        ];
        $exchangeName   = Helper::getExchangeName();
        $rabbitMq       = new RabbitMq($exchangeName);
        $routeKey       = "route_gateway";
        $rabbitMq->send($ventData, $routeKey);
        return $id;
    }
961429
public function signupLog(User $user, array $ipInfo)
    {
        $user->setAttribute('signupIp', $ipInfo);
        $this->dm->persist($user);
        $this->dm->flush();

        return $this;
    }
1020530
public function addIntegration($type, array $data = [])
    {
        $body = ['type' => $type] + $data;

        return Integration::create($body, $this->getLink('integrations'), $this->client);
    }
1215398
public function registerTransaction(array $transactionData): RegisterInterface
    {
        $uri = $this->getUri('register', $this->getParameters($transactionData));
        /** @var RegisterInterface $response */
        $response = $this->performRequest((string) $uri);

        Assert::isInstanceOf($response, RegisterInterface::class, 'Invalid response');

        return $response;
    }