![]() |
Ok can anyone including the developers out there suggest a method for solving
PHP Fatal error: Call to a member function query_first_slave() on a non-object in /path/to/my/forum/includes/functions.php on line 1194 from doing a bit of research it seems this error comes up mostly when a file X.php included file Y.PHP and Y.PHP would include the code for adding a user and in turn would include the globals.php, class_dm.php and class_dm_user.php so it seems nested including is a problem for objects further down the line has anyone got any idea's of how we can solve this issue as i'd like to make use of the datamanager for inserting users rather than the silly method of SQL inserting which isnt the best method going |
Quote:
PHP Code:
|
i do include global.php
Quote:
|
Nobody have any idea's on this? i might post this to the vbulletin programming forum and see if anyone see's it better there
|
I was pleased to find amatulic's class.forumops.php as that was exactly what I needed, excellent work!
However, I found the user login part of it acting a bit weird. PHP Code:
If you look at the function, it does not use the $vbuser['password'] value at any point! This means, if you use this login function in some page, it logs in successfully any user no matter what she supplied as her password! You might need forcing successful login when you have custom user database you check against yourself and want to ignore vbulletin user database and still be logged in to vbulletin, but in my eyes, the class implied it actually checked against the vb user database (the comments have an example where it supplied the password). I replaced the login method as follows, now it returns true when the login is successfully, false otherwise. I'm not totally sure if the md5 passwords are totally correct here, but seem to work in my quick test. PHP Code:
Feel free to comment if I had misunderstood something, but I felt it would be important bring this issue up, if someone else uses this class as a login method assuming the same thing as I did. Oh, and this skips the userdata conversion part, as I felt it was a bit pointless in this context. |
I have found the datamanager_user class (class_dm_user.php) in the includes folder of the vbulletin directory on my server.
Now could anybody please suggest me what files do I need to include in my script before I could instantiate the datamanager object and run the add process successfully? 1. What files do I need to include in my script to create a database connection? 2. Any function files that I need to include to run the process successfully? 3. Any other class file that is related with this class_dm_user.php file and required to be included as well? Thanks. |
Is there any tables may be affected when adding a new user except for the 'user' table? If so, what are they?
|
I am using your functions in my project and it worked very well! But now I want to add also an customavatar picture for new users. How can I do this with your ForumOps Code?
|
Can anyone tell me where there might be a complete updated list of what can be set for a new user in vB 3.6.9 Seems the list provided in the initial post (see below) is a little dated.
Quote:
|
Quote:
|
The ones I seem to be running into problems with are the ones below:
$newuser->set_bitfield('options', 'receivepm', '1'); --this dosn't seem to set the "Receive Private Messages" for the user to "Yes" $newuser->set_bitfield('options', 'emailonpm', '1'); --this dosn't seem to set the "Send Notification Email When a Private Message is Received" for the user to "Yes" Pop up a Notification Box When a Private Message is Received --not sure what the option is to set this one? |
Try:
PHP Code:
|
nope, didn't work
|
This was a really good code that helped me integrate VB with my existing website.
Any idea if those functions will still work in 6.7? I will wait for the final release of course of 6.7, but having this code working is a key factor for me to upgrade or not. So if someone has tried this code on 6.7, please let us know. Thanks. |
Can anyone explain step by step? How and where do we suppose to put these codes ;(
|
Still running into problems with these as well as showimages
Anyone? Anyone lol :D Quote:
|
Anyone know how to fix error:
Quote:
Quote:
|
This is the only auto-login/auto-register/integration information in all of support as far as I can tell. It is 3 years old and, while giving thanks to the author and noting that it is better than nothing, it hardly classifies as much more than a code snippet. I've seen dozens of posts on integration here that could be addressed by expanding and updating this information- surely it is not too much to ask?
--------------- Added [DATE]1211943709[/DATE] at [TIME]1211943709[/TIME] --------------- Thank You! --------------- Added [DATE]1211943812[/DATE] at [TIME]1211943812[/TIME] --------------- Quote:
--------------- Added [DATE]1211943912[/DATE] at [TIME]1211943912[/TIME] --------------- changing to the vb install directory is the key |
What fixed the error for you?
This does change to the vb directory: chdir('/home/site/public_html/forum'); |
Thanks coffeesgr your code works #1 when executed directly; unfortunately it won't work when i use it inside a $_POST action.. please help.. what am I doing wrong ? here's my code below
Quote:
|
I know this question was asked earlier, but it was never answered.
Is there any way to handle the case where the password you have is an md5 hash? I don't like sending passwords in the clear, so my login pages do the md5 hash before sending up to the server, so I don't have access to the actual password. Any ideas? --------------- Added [DATE]1213414760[/DATE] at [TIME]1213414760[/TIME] --------------- OK, I've managed to answer my own question. It turns out that you can use md5's also. If you pass in a plain-text, it will md5 it. But if you pass in an md5, it will use it as-is (basically it just checks to see if the password is 32 characters long - if it is, it assumes it's an md5). So it "just works". Cool! :up: |
I don't know if this has been covered yet but if you would like to show the username and userid in your activation mail you just have to set $username and $userid to the appropriate values.
|
Quote:
Thanks. But, when you do $userdm->save, won't the user is automatically activated? I assume that you used the code in https://vborg.vbsupport.ru/showpost....&postcount=31; --------------- Added [DATE]1215493772[/DATE] at [TIME]1215493772[/TIME] --------------- All right. This entire integration thing works partially for me. After getting frustrated, I wrote the program to get the user data from the form and update the Vbulletin tables directly. Here is the logical flow: 1. I updated user and useractivation tables with the user information. I set the usergroupid as "3" (users waiting for email activation group) in user table and added the row for the new user in useractivation table. This row will be deleted when the user activates the account. 2. I sent the activation email to the user. This is a nice thing, because I can customize the email format. If a user registers in the main site and the forum sends the activation email, it looks kind of weird. Because some users of our CMS site don't even know what is a forum. 3. User clicks the link in the activation email. Program checks the activation id in the useractivation table. If everything is ok, the usergroupid is changed from 3 to 2 in usertable. Activation record in useractivation table is deleted, because it's no longer needed. Ok. All works well. The user can do anything he wants just as he would normally do when he registers using forums/register.php. But..(you know it's coming!) there is a headache for the admin. In the admin control panel, username, email, IP, and all those fields are EMPTY for this user. Options like receive admin email, PM options, etc., are all set ok. Only the username, email, IP fields are empty. Do I need to update another table? Doesn't admin control panel use the user table to display the user profile? |
Personally I got very odd:"Existing data passed is not an array" while using amatulic's class and when doing:
Quote:
--------------- Added [DATE]1215718968[/DATE] at [TIME]1215718968[/TIME] --------------- Quote:
--------------- Added [DATE]1215719381[/DATE] at [TIME]1215719381[/TIME] --------------- This doesn't help: Quote:
ok. for some unknown reason in the userdata_convert function exist the following line: Quote:
Quote:
As I've figured out, there is some problem with login part, cause as soon as I turned it off, I was able to register user in vBulletin. At least it has showed up in the database. --------------- Added [DATE]1215760677[/DATE] at [TIME]1215760677[/TIME] --------------- It is "function fetch_userinfo_from_username" that does the trouble. It is not able to retrieve the information from database with its: Quote:
--------------- Added [DATE]1215769463[/DATE] at [TIME]1215769463[/TIME] --------------- ok. for some reason $login variable is set to true in register_newuser so that it tries to login user by default as soon as he/she is registered. However it seems that user is not inserted in database yet, when the function tries to login him/her. I don't know why, but that's what happens. So I've turned $login to false, like this: Quote:
PHP Code:
|
Is there any chance that this'll work, cross site? I'd added a forum on a different server to my main site and I wanted to sync the signups so when someone signs up on my main site it signs them up on the forum.
Any advice?? Regards, Jonaid |
You can use cURL php extension, however I do not know whether it is active by default. With cURL you can call any remote php script and pass parameters to it through the ordinary POST, just like you do it from HTML form.
|
Hi,
I'm using amatulic's code in an attempt to create a new user but I keep on getting this error even when using the example test code for making a new user. Any ideas? Fatal error: Existing data passed is not an array Called set_existing in /var/www/vhosts/carrington-club-international.co.uk/httpdocs/include/class.forumops.php on line 296 Called login in /var/www/vhosts/carrington-club-international.co.uk/httpdocs/include/class.forumops.php on line 153 Called register_newuser in /var/www/vhosts/carrington-club-international.co.uk/httpdocs/testforumreg.php on line 14 in [path]/includes/class_dm.php on line 235 Thanks Pete |
Hi threre,
I've got some trouble running the PHP code from the first post. To be honest - I'm not so familiar with PHP :( It would be great if anybody could have a look into this ... (I already posted this issue in the german board http://www.vbulletin-germany.com/for...ad.php?t=38534 and was advised to ask the author of the code ;) ) Below you'll find the (entire) code which I use in a PHP file (called createuser.php). I started the code by entering http://www.xyz.de/_forum/createuser.php in the URL-field of my browser. Code:
Unfortunately I got this error message: Quote:
Where is the bug??? Thanks Selter |
Quote:
PHP Code:
|
Quote:
Code:
Fatal error: Call to a member function query_first() on a non-object in /home/jfusiono/public_html/demo/vbulletin/includes/functions_databuild.php on line 1684 Code:
//load the vbulletin framework This is the final hurdle before releasing a Beta version of JFusion, a revolutionary Joomla universal bridge. Any help would be greatly appreciated. Thanks, Marius |
Quote:
Code:
$newuser->set('password', $userinfo->password_clear); |
This "Call to a member function" problem occurs when you try to use the Data Manager from within another program.
I have a stand alone php script that works great to set the usergroups using the Data Manager, however when I try to integrate it into my CMS, I get these errors. I don't know if there is a workaround or not - short of removing the vB includes from the CMS application - but I suspect there is. It's simply beyond my understanding. I hat to go with the CURL and remote approach, but I might be forced into it if no one has any other ideas... -t |
The problem was that the scope of the global variable is not available to all vbulletin code when called from a more complex script (standalone php file seems to work fine). Our newest addition to the JFusion programmers team has found a solution on how to make it work even from inside another program:
Code:
Thanks, Marius |
Quote:
Code:
Alan |
No thank you Alan. Great piece of troubleshooting on the issue and you have raised the level of functionality for the vbulletin JFusion plugin by a lot! Its a pleasure to have you involved with JFusion.
Thanks, Marius |
Has this tutorial changed muched for 3.7 since it was original written for 3.5?
|
It seems for me that after including vBulletin's classes that the connection link to the DB is still open, and I can't access my previous DB link.
The problem is that my forum tables are in different datebase. How I can disconnect from VB link? Thanks. |
Quote:
I have a userfield included in my registration process for Full Name. You can find it in the User Manager under the User Profile Fields section called ?Full Name?. Its writing ?field5? in the mysql database file. Can you tell me how to include this in the new users? creation? Thanks in advance for any suggestions or comments. -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
Quote:
|
I'm using the integration plugin between Interspire's Email Markerter and i'm now, out of the blue experiencing these problems.
This seems to be working flawlessly except lately i've noticed that it's missed out a few members and not added them to my mailing list. Any ideas why this would happen? Here's my plugin code; Code:
$username = $userinfo['username']; |
All times are GMT. The time now is 06:50 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|