Hi,
Im using ArbuZz's code base and its working create; i am using it as well as a SSO bridge between my app and the integrated vbulletin board. Once thing i would like to achieve is that as soon as I trigger the login call for a user through my busines logic not only the session cookie is set but that that partiular users appears as online within vbulletin as well. Is this something that can be achieved through the Data API as well? //Thomas |
Thank you, and thank you! This fixed my problem.
Quote:
|
After hours of hacking at this, I am once again stuck. I have included this code in my CMS.
Code:
if ($vbswitch == 'Y') { and lower down Code:
if ($vbswitch == 'Y') { Database object is not an object in [path]/includes/class_dm.php on line 172 I am stumped. I tried adding the global hack referenced a few posts back, and it did nothing for me. I am spending more time trying to get VB rgistration integrated that I am writing my entire CMS!!! ARRRGGGHHH !!!!! I would gladly pay someone to do this for me if I could find them. ********************************** Nevermind. I just wrote my own object. WAY faster and easier. |
Quote:
Try the following workaround: PHP Code:
|
Thanks. I had already tried that, then removed it. That was my reference to "the global hack referenced a few posts back". It did not help. At this point I am creating a new user and maintaining critical fields managed with some SQL directly into the vB database. As soon as I figure out cookies and login, I am good to go. That is, until vB changes the user scheme, at which time i will have an ongoing maintenance nightmare. OTOH it took me 2-3 hours to figure out and write the custom code from scratch, and I spent many more hours than that (and got more frustrated) trying to research and utilize the VB object library.
Added ----- After more review, I see that you added lines relating to $backupdb. That may have done the trick, but dealing with vB and its programming philosophy is just a nightmare, and I am too close to done to go backwards again. Thanks for your effort though. |
I am porting all my users from a social networking site (Drupal CMS) to our new vBulletin forum, but having a small issue.
Since all Drupal passwords are already MD5'ed, I am simply creating vBulletin users manually by connecting to the vBulletin database and inserting the appropriate data into the user-table, the userfield-table and the usertextfield-table. (Since this is what I gather from the vBulletin registration script) The users are created fine and working well, except that all users created with my script get the "Guest" title in their forum posts. And I just can't figure out why. There are no users in the unregistered/guest usergroup (where people are assigned the "Guest" title), so that's not it. We have no "Guest" user title in the User Title Manager, so that's not it either. I'm assuming I'm missing to add some data to some table for each user. Would someone here be able to offer some help? Thanks in advance. |
Quote:
If not, you have to set the usergroup id for each member: $newuser->set('usergroupid', 2); |
Quote:
Problem not really solved, but vBulletin's own "fix broken user profiles" feature does correct the user profiles, and I'm ok with this for now. |
usergroupid=2 is normally the default setting for the 'registered users' group.
Go to http://www.YourForumAddressHere.com/....php?do=modify and use whichever number for the usergroupid that you want to set for each member you're importing. The usergroupid sets the permissions that you want the user to have on the forums. Is that clearer for you? |
I appreciate the effort, but I am aware of all this. Unless there is another database table related to the usergroups, the usergroups do not seem to be the problem here.
Quote:
|
Is there an update on a working version of this for 3.8.x ???
thanks all Mike |
Quote:
|
I cant login from the site page using the user wich i have created according the way described above...can somebody plz help me :(
|
I get the error
Code:
Fatal error: Call to a member function query_read_slave() on a non-object in /var/www/test_forums/includes/functions_misc.php on line 789 PHP Code:
Thanks. |
Quote:
Booting vBulletin from non-global scope is a bit tricky. |
Quote:
I just wanted to say that I was implementing this article with Wordpress and kept getting errors about functions_databuild.php on line 1685. So I added "global $vbulletin" and started having the issue of class_dm.php on line 177 about Registry Object. The above code worked for me. So here's my function (A combination of those in this article for wordpress) Code:
// Function for vB registration // Code:
// Add the users to vBulletin |
Hello,
A few weeks ago, we launched a website with a custom registration in stead of register.php to add new users. With the help of this forum, we succeeded without any problems. Since last monday, the register was down. The php-code did not change so we have no clue what so ever what could be the problem. Error code: HTML Code:
<b>Fatal error</b>: Call to a member function query_read() on a non-object in <b>/var/www/html/forum/includes/adminfunctions.php</b> on line <b>2403</b><br /> PHP Code:
Does anybody have an idea what could be the problem. It seems that because of some changes in the settings (or something like that), we lost our database-object but didn't change anything to the code itself. |
I just happen to pass by here looking for something else and I saw your response.
Did you add a profile field, maybe? Just a thought. If you get it figured out, please post the solution :) |
Quote:
|
Unfortunately, I obtain this:
Fatal error: Call to a member function do_db_fetch() on a non-object in vb_forum/includes/init.php on line 308 An idea? Quote:
|
Using the class ForumOps (which by the way is brilliant)...... I am trying to figure out how to pass a delimited txt file of user information to it. Any help would be appreciated.
To elaborate - We have a corporate text file with the following 'user name','email address' I need to generate new VBulletin accounts for all them. Cheers! Dave |
Hi,
I am now able to programmatically add user by modifying script above but I have a problem when I tried to insert user from our existing database that has more than 25 character. I?m getting an error ?Username cannot be longer than 25 characters?. Can you guide me on how can I disable the maximum characters allowed for username? I have basic knowledge in php and I look through the following included files but I can't see the function for validation the maximum length. require_once('./global.php'); require_once('./includes/class_dm.php'); require_once('./includes/class_dm_user.php'); Anybody have done this before? Thanks! |
lanzeym, sounds like you may need to make your existing database field for username larger than 25 characters.
|
hi bigtime!
The save() methods uses vBulletin "user" table that has varchar(100) length, so there's no need for changing field lenght. There should be a hard coded "maxlength" that I don't know where it is. |
Oops, I misunderstood. I thought you were inserting users into your existing database...
|
here's how to remove the validation.
AdminCP > vBulletin Options > User Registration Options > Maximum Username Length |
Anybody can help with code example for manual users registration and login for vb 4 ?
|
I'm trying to add a new user with VB 4.0.
I'm using the latest snippet of code but when I do $newuser->save(); it saves the record to the db but return to a Database error page ( of VB ). What can I do? --------------- Added [DATE]1279029801[/DATE] at [TIME]1279029801[/TIME] --------------- Ok maybe I solved. For VB 4 you need to add this: $newuser->pre_save(); before save() or checking errors :) |
Hi,
I am trying to do something similar. I wrote a class inside a file in the main directory of my forum. This is the code: Code:
<?php Fatal error: Call to a member function do_db_fetch() on a non-object in /var/www/cyberludus.com/system/forum/includes/init.php on line 308 Where I do wrong? Thank you |
The code seems to be working, but when in debug mode a lot of notices show up. I`d rather they shouldn`t:
PHP Code:
Then I got a question, is it possibile to add an user in an inactive state, and only after a third party email validation, enable him/her? I couldn`t find any column in the vb_user table that indicates this active/inactive state, any help? |
Looking for an updated version of this script for 4.1.1
Am getting this error: Code:
Fatal error: Call to undefined function fetch_phrase() in /home2/hatnohat/public_html/forum/includes/functions.php on line 3456 This works for me. add_user.php (custom API) PHP Code:
|
Quote:
In the meantime you can simply add PHP Code:
|
I used this code and everything was working fine. Users got added, but when they tried to login, they got this message:
Code:
You have been banned for the following reason: |
Nack, make sure the user group that your user is being created under is being defined. If you aren't in the right group then they show as being banned. Hope this helps.
|
I keep getting a fatal error:Fatal error:
Code:
Fatal error: Registry object is not an object in [path]/includes/class_dm.php on line 205 Main Code Code:
<?php |
|
Quote:
Code:
ob_start(); |
What if you change your header to this:
Code:
|
Doesn't work. I had to change the directory before because I had to call a lot of the internal features within vB. I'm pulling user information and login checks of all types all over the site. If i just include the global instead of redefining the directory I get this error:
Code:
Warning: require_once(./includes/class_bootstrap.php) [function.require-once]: failed to open stream: No such file or directory in /home/shininga/public_html/divineshadowsonline/forum/global.php on line 15 |
Vbulletin 4.x user registration version:
Code:
define('THIS_SCRIPT', 'reguser.php'); |
All times are GMT. The time now is 02:42 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|