/**
  * Keeps count of registered accounts with same email
  *
  * @param User $user
  * @static
  * @return bool
  */
 public static function onConfirmEmailComplete(User $user)
 {
     global $wgAccountsPerEmail, $wgMemc;
     $sEmail = $user->getEmail();
     if (isset($wgAccountsPerEmail) && is_numeric($wgAccountsPerEmail) && !UserLoginHelper::isWikiaEmail($sEmail)) {
         $key = wfSharedMemcKey("UserLogin", "AccountsPerEmail", $sEmail);
         $iCount = $wgMemc->get($key);
         if ($iCount === false) {
             $iCount = self::getUsersPerEmailFromDB($sEmail);
             if ($iCount > 0) {
                 $wgMemc->set($key, $iCount);
             }
         } else {
             $wgMemc->incr($key);
         }
     }
     return true;
 }