1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 'Users Awaiting Approval' sort by date instead of alphabetical?

Discussion in 'Troubleshooting and Problems' started by domski2bc, Aug 5, 2016.

  1. domski2bc

    domski2bc Member

    Some users don't receive emails. Is there a way sort the list of 'users awaiting approval' by date instead of alphabetical? I have over 3000 in this state by know and I am only interested in the most recent. I want to start confirming accounts, but only recent ones.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member


    Add the red code:

    	public function actionModerated()
    		$users = $this->_getUserModel()->getUsers(array(
    			'user_state' => 'moderated'
    		), array('limit' => 30, 'order' => 'register_date', 'direction' => 'desc'));
    		$class = XenForo_Application::resolveDynamicClass('XenForo_Session');
    		/** @var $publicSession XenForo_Session */
    		$publicSession = new $class();
    That should do it.
    domski2bc likes this.
  3. domski2bc

    domski2bc Member

    Thanks Jake. This worked.
  4. Kintaro

    Kintaro Well-Known Member

    @domski2bc be careful, if you upgrade xenforo you will need to re-do the modification.
    to make it upgrade proof you need an addon.
  5. domski2bc

    domski2bc Member

    True thanks.

    Another question.

    Is there anyway to batch confirm all accounts that are awaiting an email-confirmation? Currently I have a 'new members' addon and just go one by one manually confirming. I still want to keep email confirmation on as most of my users have no issue.
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Run this query on your database to activate all users who are currently awaiting email confirmation:

    UPDATE xf_user
    SET user_state = 'valid'
    WHERE user_state = 'email_confirm';
    domski2bc likes this.
  7. adwade

    adwade Active Member

    Good point. @AndyB's New Members add-on sorts the new users by date and it's easy to see when some are still in a non-valid state...

    Screen Shot 2016-08-05 at 10.10.54 PM.jpg

    The last four columns are: Msg. Count/Conv. Count/User State/Is-Banned.

    Just a heads-up, I find about 10-15% of my un-confirmed users have entered their email address incorrectly during registration.(i.e. bob@gmial.com, etc.) I manually fix those and then resend another confirmation out (via @Apantic's Resend Activation Email add-on), which results in about 90% of those folks finishing up their registration. (y)
    domski2bc and AndyB like this.
  8. domski2bc

    domski2bc Member

    I have AndyB's addon, great resource.

    Thanks Jake. Worked!

Share This Page