This is a small instruction on creating a common authorization between two systems - Datalife Engine and Invision Power Suite.
This method will work only if your databases are on a local server and you use localhost to connect, or you know the exact address to the database - otherwise it will not work.
DLE version: 10.x, 11.x, 12.x
IPS version: 4.2
What can this integration do?
If there is a user in the DLE database, the IPS system authorizes him without problems
IPS creates a user based on the data in the DLE database
Works one-way
Instruction manual:
Open the IPS admin panel and go to authorization management: (for example, IPS v4.2.5)
Integration of DLE 10-12 + IPS 4.2.x
Activate external authorization in the IPS admin panel.
if you are not transferred automatically, then click on the pencil on the right.
Filling in the database data where the DLE is located
Details of the database schema
Integration of DLE 10-12 + IPS 4.2.x
Fill in
Table: *your prefix*_users
User name column: name
Column of Email addresses: email
Password column: password
Password encryption type: If you have DLE version 11.1 or less, we take the MD5 value, if more - Plain text
The fact is that since version 11.2, the password hash has changed in DLE and MD5 is no longer suitable. We'll fix everything in the external authorization file. Therefore, you can safely update DLE.
Additional condition: banned<>1
This parameter will not allow banned users to log in to the forum
Save
Opening the file форум/system/Login/External.php
Looking for a line (similar)
if ( !\IPS\Login::compareHashes( $this->encryptedPassword( $values['password'] ), $result[ $this->settings['db_col_pass'] ] ) )
{
throw new \IPS\Login\Exception( 'login_err_bad_password', \IPS\Login\Exception::BAD_PASSWORD, NULL, $member );
}
Above(!) we put:
switch ( $this->settings['db_encryption'] )
{
case 'plaintext':
if(!password_verify($values['password'], $result[ $this->settings['db_col_pass'] ] ) ) {
throw new \IPS\Login\Exception( 'login_err_bad_password', \IPS\Login\Exception::BAD_PASSWORD, NULL, $member );
}
default:
and below
}
Looking for:
return md5( $password );
we change it to
return md5( md5( $password ) );
Looking for:
return $password;
changing to
return password_hash($password, PASSWORD_DEFAULT);
Save
Installation is finished!
Information
Visitors who are in the group
Guests they can't download files.
Log in to the site under your
login and password or if you are a new user go through the process
registrations on the website.