Latest Member:

emma57573

Member
Hi this is a quick one (I hope)
I have an external registration process that Ive built so that any new users are automatically registered to the forum.

However I have a tiny bug in that when a new user registers externally the 'latest member' on the forum fails to update.
I get the member numbers updating but not the username of the latest member.

Ive figured this must be in the database somewhere and I need to write to it on my registration script. But where? Ive searched high and low :) If its not and is a script somewhere that i need to adapt where can i find it?
 
That statistic is updated by a cron that runs every 10 minutes. It should update automatically if you wait.

This is the code that queries the latest user:

XenForo_Model_User::getLatestUser

Code:
	public function getLatestUser()
	{
		return $this->_getDb()->fetchRow($this->limitQueryResults('
			SELECT *
			FROM xf_user
			WHERE user_state = \'valid\'
				 AND is_banned = 0
			ORDER BY register_date DESC
		', 1));
	}

Note that it only fetches 'valid' users who are not banned.

And that runs every 10 minutes via this cron:

Admin CP -> Tools -> Cron Entries -> Rebuild Board Totals Counter
 
Ok thanks, was looking in completely the wrong place for this! The issue must be something to do with how I've imported the users register date. I noticed this morning that I am getting one new update a day so must be to do with the time. Will investigate thanks
 
Top Bottom