Jump to content

Manage Inactive Members


-RAW-

Recommended Posts


You would need to have the current date/time value, minus 31536000 (seconds in a standard year). :)




What would be current date/time value, because I don't see date format in SQL table? I am assuming you said 31536000 because I am asking for 1 year old. If it would be half year then I just need to divide that by 2 and then subtract it right?

Thanks!!
Link to comment
Share on other sites

  • Replies 371
  • Created
  • Last Reply

What would be current date/time value, because I don't see date format in SQL table? I am assuming you said 31536000 because I am asking for 1 year old. If it would be half year then I just need to divide that by 2 and then subtract it right?



Thanks!!



60 seconds per minute x 60 minutes per hour = 3600 seconds per hour x 24 hours = 86400 seconds per day

Looking in one of m4rtin's PHP files, you could use this formula:
$date = time() - ( number of days * 86400 );

time() returns the current time in seconds and then the number of days (multiplied by 86400 to get seconds) is subtracted. If the last visit is lower than that value (ie, before that time), then it's a match.
Link to comment
Share on other sites

Thanks wolfie. By any chance you know what is the difference between this 2 tables?

last_visit and last_activity ?

Also, in order to delete old inactive members I will just need to delete them from ipb_members table right? Will I be breaking any keys?

Link to comment
Share on other sites


Thanks wolfie. By any chance you know what is the difference between this 2 tables?



last_visit and last_activity ?



Also, in order to delete old inactive members I will just need to delete them from ipb_members table right? Will I be breaking any keys?



My guess would be that the last visit is the last time they became active on the board, while the last activity is the last moment they did something on the board.

Not sure how to actually delete members though, except via the ACP. :D
Link to comment
Share on other sites

Members should always be deleted trough ACP, or using a method in IP.Board's framework, to ensure that all data is removed (Profile customizations, ACP permissions etc).


AlexJ: The bug has been fixed in the latest version (1.1.4). Give it a try, but please run it through debug mode first.

Link to comment
Share on other sites


AlexJ: The bug has been fixed in the latest version (1.1.4). Give it a try, but please run it through debug mode first.




I tried to run task back on test installation and it was successful! Thanks for the help in another topic also.

One suggestion:
In delete member task their is option called:
"Move after how many days of inactivity?"
It would be nice if you can change it to "Delete member after how many days of inactivity?" to avoid any confusion.

Thank you!
Link to comment
Share on other sites

One more bug which our members are getting lately:

Fatal error: Cannot use object of type ips_CacheRegistry as array in /home/XXXXXXX/XXXXX/forum/hooks/manageInactiveMember_829fed0da0fa0cff34bf0cc317bf5739.php on line 55

Link to comment
Share on other sites

  • 2 weeks later...

m4rtin any option to add check for secondary grp?

Normally it check primary grp and then moves the user. Is there any way in future you can add support for secondary grp?

or just feature to remove all secondary grps and move it to general user grp ?

Example: User A Primary grp: Staff || Secondary grp: Advanced Member, GFX Team.

So, now if inactive mod moves his primary grp from Staff to Registered User, it also clears both the secondary grp or moves to Register User grp if selected.

Thanks. :)

Link to comment
Share on other sites


Not sure but below error is still happening in 1.6.



"PHP error in the hook that moves returned inactive members back to their original group."



Are you able to figure out the PHP error your members get?

Could be that the hook file you have is outdated. Open ./hooks/manageInactiveMembers_*.php, and look at the top of the file. If that doesn't say "@version: 1.1.6", that's the issue. I'll give you the steps to upgrade that, if necessary.


Good evening,



This mod can delete topics when you do delete inactive users, the only post can erase!



basically what we are most interested!!



Thanks in advance



That task uses a built in method for deleting members. If that's not doing what you want, then I'm afraid it's out of my hands.
But neither topics or posts are deleted. They are just converted to guest posts.
Link to comment
Share on other sites

These is what it says:

/**

 *	(IM) Manage Inactive Members

 *

 * @author 		m4rtin

 * @copyright	© 2008 - 2010 Invision Modding

 * @web: 		http://www.invisionmodding.com

 * @IPB ver.:	IP.Board 3.0 & IP.Board 3.1

 * @version:	1.1.6  (10016)

 *

 */



Quick Question:

This is what should happen?
1. Member inactive for more then 2 months.
2. Mod moves them to general user group.
3. They return back.
4. Mod again moves them back to there original group?

Is that what supposed to happen? or mod should never move them back?

Link to comment
Share on other sites

]


Quick Question:



This is what should happen?


1. Member inactive for more then 2 months.


2. Mod moves them to general user group.


3. They return back.


4. Mod again moves them back to there original group?



Is that what supposed to happen? or mod should never move them back?



Yes that is what's supposed to happen.
Link to comment
Share on other sites

Hello again,

Can you tell me for sure about this mod, if we serve on a user deletes! That actually translates to delete members to visitors or not;

For several days we are in communication with the IPS support for our site and deleting the members for the reason Maintenance to our community

Simply we do very regularly deletes inactive users, but the result is that if one of these users have opened some topics, then our fault turns to a database error, and let me know if you finished this mod and those states that can make converts to delete member to visitors! I think I saw somewhere that you report is true

Do you think that will help us this mod!!!!


Thanks in advance

Link to comment
Share on other sites

If you're deleting the members directly through the database, then I'm not surprised you get MySQL errors. The member ID is what ties everything together, and if you remove one member, but don't convert the existing data, things will fall apart.

The built in method for removing data that this app make use of will convert posts and topic to guest posts. If you have experience with PHP, you can look at IPBMember::remove() in ./admin/sources/base/core.php.

Link to comment
Share on other sites

Basically do not delete from within the base exactly, but from the ACP & delete member, and IPS support we proposed each user to do delete post and then delete the member

The thing is though that the problem is the topics that can be done by the user, and what we propose is not so feasible when dealing with 2000 users example, is very time consuming

I really did not understand because at least I on the answer you, if you understand the our problem, you think this mod will help us or not!!!!!

Just want to know this, as I see that you probably understand our problem... What do you suggest

I know this is not the appropriate section on this, just because it has to do with your mod and brought the conversation!!!


Thanks for all

Link to comment
Share on other sites


m4rtin any option to add check for secondary grp?



Normally it check primary grp and then moves the user. Is there any way in future you can add support for secondary grp?



or just feature to remove all secondary grps and move it to general user grp ?



Example: User A Primary grp: Staff || Secondary grp: Advanced Member, GFX Team.



So, now if inactive mod moves his primary grp from Staff to Registered User, it also clears both the secondary grp or moves to Register User grp if selected.


I'd like this as well.
Link to comment
Share on other sites

  • 4 weeks later...

I'd like this as well.



Small change I made that I'd like to be part of the default.. For the settings, when you use the query to grab the groups, filtering out the acp/global mods, add "order" => "g_title" to the query. That way the group names are listed alphabetically, makes it easier to scroll through the list.
Link to comment
Share on other sites

A little problem:

Example:
User A: Prim: Group X and Sec: Group Z

Now lets say if any admin changes his group from ACP, so that new user group are Prim: Group D and Sec: none

Now if user login on forums after 4 months he gets auto moved to his old groups. Is there anyway to stop it? I don't want user to get auto moved to there groups if admin has done any changes on that group.

Link to comment
Share on other sites

  • 3 months later...

It might be there.. There is an option for "number of posts to delete".. I wasn't sure how that setting worked.



You can set that to 0, and it will select member with less or equal 0 posts. To make sure it does what you want, disable the task, alter the settings, and run it in debug mode first to ensure it only select those members you want to select.
Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...