anyway to bulk set status to ACTIVE

More
9 years 2 months ago #76225 by Jeff
Imported users and they all import as expired. Is there an easy way to bulk set them all to Active?

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #76247 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic anyway to bulk set status to ACTIVE
Hi Jeff

No, we will have to do that via database. However, I think we will need to edit subscription end date for each subscription record, too

I think the reason it was expired is because you have empty subscription end date ? Or the subscription end date is a pass date ?

Please give me more information so that I can answer and help you further

Tuan

Please Log in or Create an account to join the conversation.

More
9 years 2 weeks ago #79512 by Nick
Replied by Nick on topic anyway to bulk set status to ACTIVE
I would like to know the database script to update Expired members to Active. Our members renew via our magazine and not via the site. So I have to update them manually, extending the subscription by one year and making them Active.

I suddenly have 1500 users who now have status Expired. Hard work to manually go through and make them all Active.

Please Log in or Create an account to join the conversation.

More
9 years 2 weeks ago #79551 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic anyway to bulk set status to ACTIVE
Hi Nick

Could you please check to see what's the end date of the subscription record at the moment?

Tuan

Please Log in or Create an account to join the conversation.

More
9 years 1 week ago #79724 by Nick
Replied by Nick on topic anyway to bulk set status to ACTIVE
It is 01-04-2016

Please Log in or Create an account to join the conversation.

More
9 years 1 week ago #79781 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic anyway to bulk set status to ACTIVE
Hi Nick

That's a past date, and explain why the subscription is expired. We will need to set it to a future date, otherwise, even we change subscription status to active, it will be changed to Pending. So in this case, Please submit a support ticket

1. Sending us super admin account of your site

2. Let me know what's the subscription end date of the subscription record (as I said, it needs to be a future date)

3. I will then run a SQL command to your database to update status and end date of the subscription records to make it active

Regards,

Tuan

Please Log in or Create an account to join the conversation.

More
9 years 4 days ago #80271 by Nick
Replied by Nick on topic anyway to bulk set status to ACTIVE
I have changed the subscription plan to make it "lifetime". This is the only way I can see to manage subscriptions manually, as we have to do. We just have to cancel membership for those who do not renew. Most renew.

However the status of the members is still Expired. What I need to do is set them 'Active'. I would rather do this without the system sending them an email. I can disable email temporarily, of course, but this can be forgotten. Can this be done with an SQL script. I am very familiar with SQL as I work in IT.

I can let you have super admin if necessary.

Please Log in or Create an account to join the conversation.

More
9 years 3 days ago #80314 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic anyway to bulk set status to ACTIVE
Hi Nick

You can run this SQL command to your database:

UPDATE #__osmembership_subscribers SET published = 1, to_date = '2016-12-31'

After that, all subscription records will be active and be expired by the end of this year. You can change it to another date if you want

Also, need to replace #__ with the actual database table prefix on your site

Tuan
The following user(s) said Thank You: Nick

Please Log in or Create an account to join the conversation.

More
8 years 11 months ago #80759 by Nick
Replied by Nick on topic anyway to bulk set status to ACTIVE
Thanks Tuan

This updated the OS Membership table but as it does not run the usual code it did not add the users back to the Subscribers group.

I did a bit of investigation and found that an entry in the #user_usergroup_map table is required to add a user to a group. I have found the relevant syntax but am unable to paste it here as the forum thinks I am trying an SQL Injection attack.

Please Log in or Create an account to join the conversation.

More
8 years 11 months ago #80808 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic anyway to bulk set status to ACTIVE
Thanks for sharing the solution Nick. I am going to add it to FAQs section (which will be published on our site soon) so that other users can see and use the solution if needed

Thanks again

Regards,

Tuan

Please Log in or Create an account to join the conversation.