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

Disable New Users From Selecting Style

Discussion in 'XenForo Questions and Support' started by Brent W, Sep 23, 2016.

  1. Brent W

    Brent W Well-Known Member

    I simply want to keep new users from selecting a style but allow previous people who already have that style selected to continue to use it. Currently, if I disable the style from selection it appears to kick everyone to the default style. Anyway around this without an add-on I am missing?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    This may be a good starting point:


    You might use a condition like this:

    		// old users (based on user_id)
    		if ($visitor['user_id'] < 2000)
    			// do nothing
    		// new users
    			// if using the restricted style
    			if ($visitor['style_id'] == 3)
    				// set it back to default
    				$visitor['style_id'] = 1;
    The restricted style will still show up as selectable for everyone, but this code will ensure the selection doesn't work for new users.
  3. Brent W

    Brent W Well-Known Member

    Thanks I will give this a look.

Share This Page