Jump to content

Connecting MySQL Login to IPS Community Suite Forums!


FlyingSpoon

Recommended Posts

I have my login, but I have no idea how to connect it to my IPS Community Suite Forums.

I saw IP.Board Forums on MTA Forums before, but I cant find anything related to IPS Community Suite Forums.

Any idea how I can do this?

I have put the mta_sdk.php on my forums, but I dont know what to do next.

I connected my login to my Forum database, what shall I do next?

Link to comment

You want log in your server with IPBoard info? If this is so use my code (For earlier versions of IPBoard 4)

->Code:

function lowermd5(val) 
    return string.lower(md5(val)) 
end 
  
-- HOST, DATABASE, USER, PASSWORD, PORT 
local mysqlForumInfo = {"localhost", "testforo", "root", "root", 3306} --Here you should put your MYSQL connection data. 
  
function PlayerLogin(username, password) 
    local host, database, user, pass, port = unpack(mysqlForumInfo) 
    local db = dbConnect( "mysql", "host=" .. host .. ";port=" .. port .. ";dbname=" .. database, user, pass, "share=1", "autoreconnect=1" ) 
    if db then 
        local query = dbQuery(db, "SELECT members_pass_hash, members_pass_salt FROM boardmembers WHERE name = '" .. username .. "' ") 
        local query = dbPoll(query, -1) 
        if #query ~= 0 then 
            local data = query[1] 
            local hash = lowermd5(lowermd5(data.members_pass_salt) .. lowermd5(password)) 
            if hash == data.members_pass_hash then 
                outputDebugString("Correct") 
            else 
                outputDebugString("Incorrect") 
            end 
        else 
            outputDebugString("User not found") 
        end 
    end 
    destroyElement(db) 
end 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...