Skip to content

vBuser vBulletin based Auth Library

World Wide Web Server edited this page Jul 4, 2012 · 16 revisions

[b] This package allows for an easy session handler and auth library by piggybacking on vBulletin's user tables. [/b]

Author: ? Co-Author: Pat Andrew ( [url]http://patandrew.com[/url] )

[b] [size=3]DISCLAIMER:[/size]

I am not the original author of this Auth library.  I found this library on the CodeIgniter forums some time ago and have retained and modified the source.
    
If you are the original Author and would like to take credit, please contact Pat Andrew.

[/b]

[b]

-- -- [color=red]UPDATE![/color] -- Cookie user authentication has been fixed. 5/2/2009

----------------------------------------------------------------------[/b]

[size=5][b]Installation:[/b][/size]

[size=4][b]Step 1.[/b][/size] Upload the vBuser files to their respective folders from [b]application/[/b]

[size=4][b]Step 2.[/b][/size] Add the following to the config file: [b]hooks.php[/b]

[code]
/**

  • vBuser Auth Check
  • this hook calls load_vBUser after the controller constructor
  • so every user has a session.

*/ $hook['post_controller_constructor'] = array( 'class' => '', 'function' => 'load_vBUser', 'filename' => 'vBUser.php', 'filepath' => 'hooks' );

[/code]

[size=4][b]Step 3.[/b][/size] Modify [b]config/vbuser.php[/b] and add your Forum URL, and default avatar path. Also modify any other features you need.

[size=4][b]Step 4.[/b][/size] Implement in your CI powered pages and Enjoy!

[size=5][b]Usage:[/b][/size]

Set up a form as seen in [b]example/views/login.php[/b] that points to your processing controller/function. I have created a simple processing controller called [b]example/controllers/process.php[/b] for login and logout procedures. You may use them or edit them as you wish.

User data will be stored in an array [b]$this->vbuser->info;[/b]

You can get a user's avatar url with: [code] $this->vbuser->getAvatar($this->vbuser->info['userid']); [/code]

[size=4][b]Download:[/b][/size]

[size=3][b][url=http://codeigniter.com/wiki/552550cf455f7f2247c226b35a010b30/]Download this package![/url][/b][/size]

Category:Contributions::Libraries::Authentication

Clone this wiki locally