Announcement

Collapse
No announcement yet.

Registration Referrers that arent members (custom referrers)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Registration Referrers that arent members (custom referrers)

    When registering I would like to give the user the option of entering anything, not just a username. Example: Google, Twitter, Facebook. I would prefer not to make names for common possibilities.

    Any ideas?

  • #2
    You could create a profile field for this.

    Comment


    • #3
      That is a good solution, but I would like to avoid that and use the referrer field that is already there.

      Comment


      • #4
        That's not possible, because the standard referrerfield is being checked by vB
        So why not use the standardfield for the name and an second field for twitter/facebook/etc
        PHP Code:
        /**
            * Verifies a specified referrer
            *
            * @param    mixed    Referrer - either a user ID or a user name
            *
            * @return    boolean
            */
            
        function verify_referrerid(&$referrerid)
            {
                if (!
        $this->registry->options['usereferrer'] OR $referrerid == '')
                {
                    
        $referrerid 0;
                    return 
        true;
                }
                else if (
        $user $this->dbobject->query_first("SELECT userid, username FROM " TABLE_PREFIX "user WHERE username = '" $this->dbobject->escape_string($referrerid) . "'"))
                {
                    
        $referrerid $user['userid'];
                }
                else if (
        is_numeric($referrerid) AND $user $this->dbobject->query_first("SELECT userid, username FROM " TABLE_PREFIX "user WHERE userid = " intval($referrerid)))
                {
                    
        $referrerid $user['userid'];
                }
                else
                {
                    
        $this->error('invalid_referrer_specified');
                    return 
        false;
                }

                if (
        $referrerid AND $referrerid == $this->existing['userid'])
                {
                    
        $this->error('invalid_referrer_specified');
                    return 
        false;
                }
                else
                {
                    return 
        true;
                }
            } 
        So you would have to change the complete registratationprocess and maybe also the user datamanager to

        Comment


        • #5
          Okay, thanks for the explanation.

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X