Registered Customers

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 年 前
I have an nopCommerce store and I'd like to know how to delete fake register accounts. I know I can delete one by one, but I'd like to know how I can delete them all at once. I have many registered fake accounts, which happened before we added Captcha to the site. Now we have many fake accounts. We'd like to remove them all.
3 年 前
Hi,

There are two ways to delete the fake accounts if there are only limited number of records you can delete them manually one by one.
Or you can make a SQL queries for deletion of these records but you need to have a criteria based on which you will consider them as fake accounts. Based on which you have to create a query.

If you need any help please feel free to contact us.

Kind Regards
TMotions
3 年 前
For what it's worth, ...
Here are some SQL queries I've used.  I left in the "select * " , so you can examine the results first ( to be sure your not deleting any legitimate customers).  When ready, remove the "--" from the DELETE line and put "--" in front of the SELECT line (that follows).

--DELETE Customer
select Id, Email, CreatedOnUtc, Active, Deleted, LastIpAddress from Customer
WHERE Id IN (select EntityId from GenericAttribute where KeyGroup = 'Customer' and [Key] = 'FirstName' and  len(value) > 50 )

--2) the 'google' company
--DELETE Customer
select Id, Email, CreatedOnUtc, Active, Deleted, LastIpAddress from Customer
WHERE Id IN  (select  EntityId from GenericAttribute g where g.Value = 'google')

--3) only registered and nothing more (LastVisitedPage)
;with del as
(
    select Id, Email, CreatedOnUtc, Active, Deleted, LastIpAddress, (select Value from GenericAttribute ca where ca.EntityId = c.Id and ca.[Key] = 'Company') as Company
      from customer c
     where 1=1
       and CreatedOnUtc = LastActivityDateUtc
       and Email is not null
       and not exists (select  1 from  [Order] o where o.CustomerId = c.Id)
       and exists (select 1 from GenericAttribute ca where ca.EntityId = c.Id and ca.[Key] = 'LastVisitedPage' and (ca.value like '%/register%' /*or ca.value like '%/contactus'*/))
)
--delete customer where Id in (select Id from del)
select * from del
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.