Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -229,4 +229,32 @@ class _Joomla extends \IPS\convert\Software
|
||||
$libraryClass->setLastKeyValue( $row['id'] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a login
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param string $password Password from form
|
||||
* @return bool
|
||||
*/
|
||||
public function login( $member, $password )
|
||||
{
|
||||
/* Joomla 3 */
|
||||
if( preg_match( '/^\$2[ay]\$(0[4-9]|[1-2][0-9]|3[0-1])\$[a-zA-Z0-9.\/]{53}/', $member->conv_password ) )
|
||||
{
|
||||
require_once \IPS\ROOT_PATH . "/applications/convert/sources/Login/PasswordHash.php";
|
||||
$ph = new \PasswordHash( 8, TRUE );
|
||||
return $ph->CheckPassword( $password, $member->conv_password ) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
/* Joomla 2 */
|
||||
if ( \IPS\Login::compareHashes( $member->conv_password, md5( $password . $member->misc ) ) )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user