Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Add user to group #69

Open
ericciaparicio opened this issue Dec 15, 2017 · 0 comments
Open

Add user to group #69

ericciaparicio opened this issue Dec 15, 2017 · 0 comments

Comments

@ericciaparicio
Copy link

ericciaparicio commented Dec 15, 2017

Hello. I need to add a user to group programatically. Now I am register a user programatically but the group is "None".

`<?php

namespace Fabiang\Xmpp\Protocol;

use Fabiang\Xmpp\Util\XML;

/**

  • Register new user

  • @param string $username

  • @param string $password

  • @param string $email

  • @Package XMPP\Protocol

  • @category XMPP
    */
    class RegisterUserER implements ProtocolImplementationInterface
    {
    protected $username;
    protected $password;
    protected $email;

    /**

    • Constructor.
    • @param string $username
    • @param string $password
    • @param string $email
      */
      public function __construct($username, $password, $email)
      {
      $this->username = $username;
      $this->password = $password;
      $this->email = $email;
      }

    /**

    • Build XML message
    • @return type
      */
      public function toString()
      {
      $query = "%s%s%s";
      return XML::quoteMessage($query, XML::generateId(), (string) $this->username, (string) $this->password, (string) $this->email);
      }
      }
      `
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant