public function init()
    {
        parent::init();

        if ($this->identityClass === null) {
            throw new InvalidConfigException('User::identityClass must be set.');
        }
        if ($this->enableAutoLogin && !isset($this->identityCookie['name'])) {
            throw new InvalidConfigException('User::identityCookie must contain the "name" element.');
        }
        if (!empty($this->accessChecker) && is_string($this->accessChecker)) {
            $this->accessChecker = Reaction::create($this->accessChecker);
        }
    }