Register user from external form

Asked by dspweb

Hi,
it is possibile to register a new user from an external form?
Can I add a new user directly on the MySQL table?

Thanks,
best regards

Andrea

Question information

Language:
English Edit question
Status:
Solved
For:
AuthPuppy Edit question
Assignee:
No assignee Edit question
Solved by:
vrdvaibhav
Solved:
Last query:
Last reply:
Revision history for this message
vrdvaibhav (vrdvaibhav) said :
#1

using apWebaServices plugin you can signup from external form ..
along With url specified in authpuppy wiki of apWebServices Plugin,
you have to pass few parameters in the get/post request which are there when you use authpuppy signup form

&submit[apAuthLocalUsersignup]=1
&ap_user[username]="your username"
&ap_user[password]="your password"
&ap_user[password_again]="same value"
&ap_user[email]="your email"
&link=signup
&ap_user[remember_me]=0";

This will add user to apUser table in your authpuppy database

Revision history for this message
Bassam KA (biso911) said :
#2

i tried to do it several times, but i couldnt
my webhost doesnt support curl.

Revision history for this message
dspweb (assistenza-n) said :
#3

Hi, I've tried this string:

http://xxxx.local/ws/?action=auth&authenticator=apAuthLocalUser&submit[apAuthLocalUsersignup]=1&ap_user[username]="aaaaaaaaa"&ap_user[password]="123458678"&ap_user[password_again]="123458678"&ap_user[email]=<email address hidden>&ap_user[email_again]=<email address hidden>&link=signup&ap_user[warning]=1&ap_user[remember_me]=0

but this return me an 'Error' string on the page

thanks
Andrea

Revision history for this message
Best vrdvaibhav (vrdvaibhav) said :
#4

go to
\plugins\apWebServicePlugin\modules\apWebService\actions\actions.class.php

this is the class from where that 'Error' String is coming from.
Print the $e variable(echo or var_dump) to get exact error causing to display this message.
Then according to that you can take further action.
In my case it is because I didn't set up email client to send email varification

Revision history for this message
dspweb (assistenza-n) said :
#5

Thanks vrdvaibhav, that solved my question.