Skip to content
  • Categorieën
  • Recent
  • Tags
  • Populair
  • Gebruikers
  • Groepen
  • Zoeken
Collapse
Brand Logo

Kennisbank

  1. Home
  2. TFH Tech
  3. Handleidingen
  4. User registration via API

User registration via API

Scheduled Pinned Gesloten Verplaatst Handleidingen
1 Berichten 1 Plaatsers 14 Weergaven
  • Oudste berichten bovenaan
  • Meest recente berichten bovenaan
  • Meeste stemmen
Aanmelden om te reageren
Dit onderwerp is verwijderd. Alleen gebruikers met beheerrechten op onderwerpniveau kunnen dit inzien.
  • ? Offline
    ? Offline
    Een ex-gebruiker
    wrote on voor het laatst aangepast door Een ex-gebruiker
    #1

    Via client:

    • [client] POST /api/freighthero/user/register [$user[], $profilevalues[]]
      • model.user.creating triggers freighthero.user.creating.clientwhich will try to register user at host;

        • [host] POST /api/freighthero_api/user/register [$user[], $profilevalues[]]
          Will create the user on host and trigger model.user.created.

          • [prio 0] userprofile stores the values from var $profilevalues[] that are in the request.
          • [prio -100] Contactmanager will import the company or attach user to contact. <-fails because App::user() is still null

          $tfh_id is created and stored to the profile. User and tfh_id are returned to client, or 400 exception is sent back on fail (e.g. existing username/email).

      • When successfully stored at host, client will add the new $tfh_id to the $profilevalues[] in request, and proceed saving user.

      • Event model.user.created is triggered on the client after that.

        • [prio 0] userprofile stores the values from var $profilevalues[] that are in the request.
        • [prio -100] Contactmanager skips on client.
      • User is logged on to client

    Op deze manier wordt een account via client alleen op de master en de afzender client geregistreerd. Dit is niet voldoende.
    Altijd eerst op master registreren, en dat broadcasten naar alle clients, dan weer vanaf client of master oppakken.

    • [client] POST /api/freighthero/user/register [$user[], $profilevalues[]]
      The request will be forwarded to the host-api:

    • [host] POST /api/freighthero_api/user/register [$user[], $profilevalues[]]
      Will create the user on host and trigger model.user.created.

      • [prio 0] userprofile stores the values from var $profilevalues[] that are in the request.
      • [prio -100] Contactmanager will import the company or attach user to contact. <-fails because App::user() is still null

      $tfh_id is created and stored to the profile. User and tfh_id are returned to client, or 400 exception is sent back on fail (e.g. existing username/email).

    1 Antwoord Laatste antwoord
    0
    • nikitaskliarovN nikitaskliarov moved this topic from TFH Tech on

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categorieën
    • Recent
    • Tags
    • Populair
    • Gebruikers
    • Groepen
    • Zoeken