Add user to database?
- ravage
- Topic Author
- Offline
- New Member
Less
More
- Thank you received: 0
17 years 5 months ago #944
by ravage
Hello Emir,
First of all, thanks for Vodes.
I use Vodes on my site and it's working like a charm
And although I am a php newbie, most of the vodes code was clear to me.
However, I am struggling with 1 thing.
When a new user does a signup, I want to add him automatically to vodes_credits (with 10 credits) , but cant figure out how to do this.
I looked through the vodes.php millions of times and think that it must be there somewhere between line 248 and 277.
(All I get is empty database fields with that piece of code, it's working perfect with paypal though))
I know the purpose of Vodes is to implement it yourself, but I hope you can give me a hint?
Thanks,
Ravage
First of all, thanks for Vodes.
I use Vodes on my site and it's working like a charm
And although I am a php newbie, most of the vodes code was clear to me.
However, I am struggling with 1 thing.
When a new user does a signup, I want to add him automatically to vodes_credits (with 10 credits) , but cant figure out how to do this.
I looked through the vodes.php millions of times and think that it must be there somewhere between line 248 and 277.
(All I get is empty database fields with that piece of code, it's working perfect with paypal though))
I know the purpose of Vodes is to implement it yourself, but I hope you can give me a hint?
Thanks,
Ravage
Please Log in or Create an account to join the conversation.
- Saka
- Offline
- Administrator
17 years 5 months ago #951
by Saka
Emir Sakic
www.sakic.net
Well if you want to add credits to users on signup you would have to trigger it from the core registration component.
So just add the code to add credits somewhere in registration.php
So just add the code to add credits somewhere in registration.php
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.
- ravage
- Topic Author
- Offline
- New Member
Less
More
- Thank you received: 0
17 years 5 months ago #952
by ravage
Hello Emir,
Thanks for your reply.
I am trying just that.
But maybe I was not clear with my previous message.
A new user does a signup on my site.. ( I use Community builder for that).
After that signup, the user isnt added to the vodes_credits table by default.
I can add that user manually in the backend, but want to add new users automatically in the _vodes_credits table.
I know that vodes can do it with a paypal payment, so I looked at this part
in vodes.php and concluded that it must be this part?
But when I add (and more from the paypal part) this to the registration core, only an empty field is added.
So now I hope you can give me a hint about what I am doing wrong.
(btw , when I just add the code to add credits, No user is made in vodes_credits)
Thanks,
Ravage
Thanks for your reply.
I am trying just that.
But maybe I was not clear with my previous message.
A new user does a signup on my site.. ( I use Community builder for that).
After that signup, the user isnt added to the vodes_credits table by default.
I can add that user manually in the backend, but want to add new users automatically in the _vodes_credits table.
I know that vodes can do it with a paypal payment, so I looked at this part
in vodes.php and concluded that it must be this part?
} else {
$query = "INSERT INTO #__vode_credits VALUES (
'',
'$row2->id',
'$credit'
)";
$database->setQuery($query);
$database->query();
}
But when I add (and more from the paypal part) this to the registration core, only an empty field is added.
So now I hope you can give me a hint about what I am doing wrong.
(btw , when I just add the code to add credits, No user is made in vodes_credits)
Thanks,
Ravage
Please Log in or Create an account to join the conversation.
- Saka
- Offline
- Administrator
17 years 5 months ago #953
by Saka
Emir Sakic
www.sakic.net
Then you are doing something wrong. That's the hint and the way it should work.
I can't give you exact code and debug it for you, no time for that. It something that's done on custom bases for a fee, sorry.
I can't give you exact code and debug it for you, no time for that. It something that's done on custom bases for a fee, sorry.
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.
- ravage
- Topic Author
- Offline
- New Member
Less
More
- Thank you received: 0
17 years 5 months ago #956
by ravage
Hello Emir,
Well thanks anyway, I will try harder.
Well thanks anyway, I will try harder.
Please Log in or Create an account to join the conversation.