Fileref:login/sl reg linker.php

From SLIS Second Life Wiki

Jump to: navigation, search

Image:folder.gif (parent)

This Linker Script allows the Sloodle Registration Booth object to communicate with the Moodle site. It will register a new avatar, and provide a link to the Registration Welcome Interface Script to complete the process via login to Moodle.


Contents

Dependencies

Sloodle files:


Parameters

The following HTTP parameters are required:

  • sloodlepwd = the site's Prim Password
  • sloodleuuid = UUID of the avatar to be registered
  • sloodleavname = name of the avatar to be registered


Response

If successful, the script will return status code 1, and the data line will be the URL which the user should load in their browser to complete the process. Alternatively, if the specified avatar is already fully registered, then the status code will be 301 (although the URL will still be provided).


Algorithm

  1. Construct SloodleLSLHandler object
  2. Process request data
  3. Authenticate request
  4. Ensure both the avatar name and UUID were specified (terminate with an error message if not)
  5. Check if the avatar is already registered
  6. If the avatar was already registered, check if it is linked to a Moodle account
  7. If avatar is not registered at all then:
    1. Create a new Sloodle user (terminate with an error if unsuccessful)
  8. If Sloodle user does not have a login security token then:
    1. Generate a new login security token
    2. Store it in the database (terminate with an error if unsuccessful)
  9. Construct user authentication URL
  10. Render response
  11. Terminate script


This page is part of the Sloodle documentation
SloodleDocs Home | User Documentation | Administrator Documentation | Developer Documentation | Sloodle Wiki Home