Generate activation url

I think similar question is answered here:

Send user activation email when programmatically creating user

Please have a look.

Let me know if that solves the issue.

error code: 523