we can block customers with something like that
action -> login :
\osCommerce\OM\Core\Site\Shop\Account.php :
/**
* Checks if customer status is blocked with the provided e-mail address
*
* @[member='param'] string $email_address The e-mail address to check for
* @[member='access'] public
* @[member='Return'] boolean
*/
public static function checkStatus($email_address) {
$OSCOM_PDO = Registry::get('PDO');
$Qcheck = $OSCOM_PDO->prepare('select customers_id from :table_customers where customers_status = 1 and customers_email_address = :customers_email_address limit 1');
$Qcheck->bindValue(':customers_email_address', $email_address);
$Qcheck->execute();
return ( $Qcheck->fetch() !== false );
}
\osCommerce\OM\Core\Site\Shop\Application\Account\Action\LogIn\Process.php :
<?php
/**
* osCommerce Online Merchant
*
* @[member='copyright'] Copyright (c) 2011 osCommerce; http://www.oscommerce.com
* @[member='licensed2kill'] BSD License; http://www.oscommerce.com/bsdlicense.txt
*/
namespace osCommerce\OM\Core\Site\Shop\Application\Account\Action\LogIn;
use osCommerce\OM\Core\ApplicationAbstract;
use osCommerce\OM\Core\Registry;
use osCommerce\OM\Core\Site\Shop\Account;
use osCommerce\OM\Core\OSCOM;
class Process {
public static function execute(ApplicationAbstract $application) {
$OSCOM_NavigationHistory = Registry::get('NavigationHistory');
$OSCOM_MessageStack = Registry::get('MessageStack');
if ( !empty($_POST['email_address']) && !empty($_POST['password']) ) {
// check address email
if( Account::checkEntry($_POST['email_address']) ) {
// check first if status = 1
if( Account::checkStatus($_POST['email_address']) ) {
// check account
if( Account::logIn($_POST['email_address'], $_POST['password']) ) {
$OSCOM_NavigationHistory->removeCurrentPage();
if ( $OSCOM_NavigationHistory->hasSnapshot() ) {
$OSCOM_NavigationHistory->redirectToSnapshot();
} else {
OSCOM::redirect(OSCOM::getLink(null, OSCOM::getDefaultSiteApplication(), null, 'AUTO'));
}
OSCOM::redirect(OSCOM::getLink(null, OSCOM::getDefaultSiteApplication(), null, 'AUTO'));
}
}
$OSCOM_MessageStack->add('LogIn', 'account blocked !');
}else{
$OSCOM_MessageStack->add('LogIn', OSCOM::getDef('error_login_no_match'));
}
}else{
$OSCOM_MessageStack->add('LogIn', 'email address and password are required !');
}
}
}
?>
just a suggestion...