Documentation

First login: Creation of a link for the first access of a new user ( without give the user a password and forcing him to set one)

This post could be useful if you want to give to a user a link for access your portal, without the need of a password, and then force him to create a password at his fist login.

You can, for example, send an email after the sign up with a link that allows the user change its password.
Steps:
  1. Create your user
  2. Define the parameter:
    • PLATFORM_BASE_URL (you can find it in 4WS.Platform), in this case: http://testing.sinesy.it/platformpicktour/
      Note: this parameter is also needed for the forgotten password function.
  3. Create you link in this way:
 
var rtk = utils.getEncodedRtk("applicationId=" + APPLICATION_ID + "&companyId=" + COMPANY_ID + "&siteId=" + SITE_ID + "&username=" + USER_ID + "&password=" + PASSWORD + "&forgotpwd=Y" + "&appTitle=" + APP_TITLE);
 


var firstLoginUrl = utils.getParameter("PLATFORM_BASE_URL");
firstLoginUrl += '/4ws/index_app.jsp?rtk=';
firstLoginUrl += rtk;
Notes:
  • The following parameters specified in the function must be the new user ones
    • APPLICATION_ID
    • COMPANY_ID,
    • SITE_ID
    • USER_ID
    • PASSWORD
    • APP_TITLE
  • In this case a temporary password for the user was manually generated and sent by email.