-
Notifications
You must be signed in to change notification settings - Fork 0
vBuser vBulletin based Auth Library
[code]######################################################################
#---------------------------------------------------------------------
#- vBuser
#-
#- This package allows for an easy session handler and auth library
#- by piggybacking on vBulletin's user tables.
#-
#- Author: ?
#- Co-Author: Pat Andrew ( http://patandrew.com )
#-
#- Modified: 2/21/2009
#---------------------------------------------------------------------
######################################################################
[/code]
[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]
[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!
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]