• How does the newuser work in the startSSJS

    By stephen chan 6 years ago

    Hi, this is a fantastic application and it's clear why it won the competition. I've been dissecting it trying to understand how it works and it's teaching me a lot - and teaching me I know very little too!



    I've tried to copy how the registration mechanism works for one of my own applications. In the code with SSJS debugging on, I can see each line evaluate but when it gets to:


        newuser.setValue(&quot;UniqueID&quot;,@Unique());<br/>
        newuser.setValue(&quot;Password&quot;,epw); <br/>
        newuser.save();<br/>
    



    I cannot see how the system doesn't faile as 'newuser' is not defined anywhere.



    Can you help explain how this bit works?



    Thanks

    • ccReg

      By Thomas Adrian 6 years ago

      newuser is a document data source in ccReg

       

      Good Luck

      If you have more questions, send an email to 

      thomas.adrian (a) consili.se

      • ccReg

        By stephen chan 6 years ago

        Thanks very much for that help. It was such a basic error by myself to have missed it being a datasource -

        I'im still learning XPages - a great product.