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

Lack of Interest userdw improvement

Discussion in 'Closed Suggestions' started by ragtek, Aug 9, 2012.

  1. ragtek

    ragtek Guest

    the usergroup
    Why it's necessary, to set the default usergroup id for new users manual??
    IMO this should be handled by the datawriter,... if non groupid is set, set the default groupid ( XenForo_Model_User::$defaultRegisteredGroupId )

    IMO the logic doesn't need to handle this.
    just like the language_id for example

    the userdw should require IMO only username & pw to be able to create successful a new user record.
    All other fields are already handled by the dw, so the default group id should be handled too, without needing to set it manual
  2. ragtek

    ragtek Guest

    that's what i have changed and is working

    Index: library/XenForo/DataWriter/User.php
    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    --- library/XenForo/DataWriter/User.php(revision )
    +++ library/XenForo/DataWriter/User.php(revision )
    @@ -65,7 +65,7 @@
     => array('type' => self::TYPE_BOOLEAN, 'default' => 1),
    -=> array('type' => self::TYPE_UINT, 'required' => true),
    +=> array('type' => self::TYPE_UINT),
     => array('type' => self::TYPE_BINARY, 'default' => ''),
    @@ -731,7 +731,11 @@
     if ($this->isChanged('scheme_class', 'xf_user_authenticate') || $this->isChanged('data', 'xf_user_authenticate'))
     $this->set('remember_key', XenForo_Application::generateRandomString(40));
    +        if (!$this->get('user_group_id')){
    +            $this->set('user_group_id', XenForo_Model_User::$defaultRegisteredGroupId);
    +        }
     if (!$this->get('csrf_token'))

    Attached Files:

Share This Page