![]() |
|
Thread Tools |
#1
|
||||
|
||||
add new lines to a table, when user register
Hi guys, i am looking for a product or thread about this, but still cant found it yet
so when user register, i need to add new line to a table, for example i have a customtable in database the user is register & the userid is 10 i need to add this line in customtable :
maybe using a plugin, with register_addmember_complete hook? please help if you can, GBU for replying --------------- Added 02 Dec 2013 at 16:38 --------------- update, i already get the code for the plugin, its like this
the problem now is only what hook i need to use? - using global_start is working, but its inserting more than one lines for each member, only need 1 line for each member - using register_start, the line is created, but userid is still not created yet, still get 0 value - using register_addmember_complete, not working at all please help guys, only which hook question i need to choose now
__________________
I am SEO specialist and forum coordinator No members have liked this post.
|
#2
|
|||
|
|||
I think you would want to use register_addmember_complete, but I don't know why it won't work for you. I think you'd want to use $userid for the new user's id instead of $vbulletin->userinfo['userid'].
No members have liked this post.
|
#3
|
||||||||||||
|
||||||||||||
already tried this code
or this
with hook register_addmember_complete, but nothing new line created in the table, is it i already right write the code? btw my first code
work created new line & get the userid, with hook global_start, maybe this is alternative way, but only need 1 line for each member, that is after registering, i try wrap with these if conditional but its still not right : if ($show['member']) { if (THIS_SCRIPT == 'register') { // above my first code } } please give suggestion any hook or methode that will work like i need above
__________________
I am SEO specialist and forum coordinator No members have liked this post.
|
#4
|
||||
|
||||
$userid should work for the actual userid if the person who just registered. So, you should define $friendid and use that as the $friendid.
__________________
Former vBulletin.org Staff Member
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before. W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) The following members like this post: basketmen
|
#5
|
||||||||||||||||
|
||||||||||||||||
Originally Posted by basketmen
ah its already working with hook register_addmember_complete, so its need Execution Order 1, instead 5![]()
Originally Posted by Lynne
thank you for answering, in my case i need the new registered member as friendid, but i can change to the opposite if needed later![]()
thank you very much & GBU for kh99 & Lynne hope this thread can help others that need similar information too
__________________
I am SEO specialist and forum coordinator No members have liked this post.
|
![]() |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 12:32.