Current time: 07-28-2014, 02:22 PM Hello There, Guest! (LoginRegister)


Jump to the post that solved this thread.
Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mybb 1.6 authentication system
01-04-2011, 03:30 PM
Post: #1
Not Solved mybb 1.6 authentication system
Hi all,
I like very much mybb and I would like to implement its authentication and user management system in a php-based upload/download system developed by me.
Given that this will be absolutely *not commercial*, I would like to make 2 questions:

1) Would it be allowed to take some code from mybb 1.6.1 package and add it to something developed by me ? Up to now I wouldn't even need to distribute it, just use it for my web site.

2) If the answer to the previous question is yes, Angel which files contain the authentication logic (user registration, login, permission management, allow access only to registered users) ? What exactly should I integrate in my code (other than obviously a mysql database) ?

Thnak you very much for any hint and suggestion.
Diabolik
Find all posts by this user
Quote this message in a reply
01-04-2011, 07:54 PM
Post: #2
Not Solved RE: mybb 1.6 authentication system
I believe that according to the license that MyBB is released under you may use, modify, and redistribute any code from the MyBB source as long as proper credit is given. (I would leave a comment like "Based on the original code of MyBB" and leave their copyright in your php documents.) The full license in all of its glory can be found here: http://www.mybb.com/about/license

The source documentation will help you understand the source code including the functions and classes related to user authentication. You can find that here: http://www.mybb.com/sourcedocs/
Find all posts by this user
Quote this message in a reply
01-05-2011, 10:17 AM
Post: #3
Not Solved RE: mybb 1.6 authentication system
(01-04-2011 07:54 PM)Zach Wrote:  The source documentation will help you understand the source code including the functions and classes related to user authentication.

Ok, I'll give it a look, thanks.
The most important point is the check which allows only registered users to view forums and post, do you know the exact point where is this check ?

Bye,
Diab
Find all posts by this user
Quote this message in a reply
01-05-2011, 10:33 AM
Post: #4
Not Solved RE: mybb 1.6 authentication system
(01-05-2011 10:17 AM)Diabolik Wrote:  
(01-04-2011 07:54 PM)Zach Wrote:  The source documentation will help you understand the source code including the functions and classes related to user authentication.

Ok, I'll give it a look, thanks.
The most important point is the check which allows only registered users to view forums and post, do you know the exact point where is this check ?

Bye,
Diab

The MyBB initialization scripts load up all the relevant variables in to the $mybb object from where the rest of the script then picks up and checks various items.

To check for whether a user is registered, member, modertaor, admin etc, it simply becomes a matter of checking variables in the $mybb object:

Code:
if($mybb->user['uid'] != 0) << If this is true user is registered

if($mybb->usergroup['canmodcp'] == 1) << User is Moderator

if($mybb->usergroup['cancp'] == 1 << User is Admin

The class in inc/class_core.php is where all the variables are put in to the $mybb object
Visit this user's website Find all posts by this user
Quote this message in a reply
01-07-2011, 09:25 AM
Post: #5
Not Solved RE: mybb 1.6 authentication system
(01-05-2011 10:33 AM)- G33K - Wrote:  The class in inc/class_core.php is where all the variables are put in to the $mybb object

Ok, thanks, I'll study on it. Smile
Bye,
Diab
Find all posts by this user
Quote this message in a reply
01-14-2011, 09:41 AM
Post: #6
Not Solved RE: mybb 1.6 authentication system
I have been working on it for few days, but it seems not feasible, as I should
include a lot of files deeply linked among each other. Dodgy

I think I'll have to do it by myself.
Bye
Find all posts by this user
Quote this message in a reply
Jump to the post that solved this thread.
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication