(self, request, username, async_signup)
return User.objects.get(username=username), new_web_user
This creates a new user in HQ based on information in the request.
        :param request: HttpRequest
        :param username: String (username)
        :param async_signup: AsyncSignupRequest
        :return: User, WebUser
This creates a new user in HQ based on information in the request.
        :param request: HttpRequest
        :param username: String (username)
        :param async_signup: AsyncSignupRequest
        :return: User, WebUser
This creates a new user in HQ based on information in the request . : param request : HttpRequest : param username : String ( username ) : param async_signup : AsyncSignupRequest : return : User WebUser
def _create_new_user(self, request, username, async_signup):
        """
        This creates a new user in HQ based on information in the request.
        :param request: HttpRequest
        :param username: String (username)
        :param async_signup: AsyncSignupRequest
        :return: User, WebUser
        """
        invitation = async_signup.invitation if async_signup else None
        created_via = (USER_CHANGE_VIA_SSO_INVITE if invitation
                       else USER_CHANGE_VIA_SSO_NEW_USER)
        created_by = (CouchUser.get_by_user_id(invitation.invited_by) if invitation
                      else None)
        domain = invitation.domain if invitation else None

        new_web_user = activate_new_user(
            username=username,
            password=User.objects.make_random_password(),
            created_by=created_by,
            created_via=created_via,
            first_name=get_sso_user_first_name_from_session(request),
            last_name=get_sso_user_last_name_from_session(request),
            domain=domain,
            ip=get_ip(request),
        )
        request.sso_new_user_messages['success'].append(
            _("User account for {} created.").format(new_web_user.username)
        )
        self._process_new_user_data(request, new_web_user, async_signup)
        return User.objects.get(username=username), new_web_user
def _create_new_user ( self , request , username , async_signup ) : invitation = async_signup . invitation if async_signup else None created_via = ( USER_CHANGE_VIA_SSO_INVITE if invitation else USER_CHANGE_VIA_SSO_NEW_USER ) created_by = ( CouchUser . get_by_user_id ( invitation . invited_by ) if invitation else None ) domain = invitation . domain if invitation else None new_web_user = activate_new_user ( username = username , password = User . objects . make_random_password ( ) , created_by = created_by , created_via = created_via , first_name = get_sso_user_first_name_from_session ( request ) , last_name = get_sso_user_last_name_from_session ( request ) , domain = domain , ip = get_ip ( request ) , ) request . sso_new_user_messages [ 'success' ] . append ( _ ( "User account for {} created." ) . format ( new_web_user . username ) ) self . _process_new_user_data ( request , new_web_user , async_signup ) return User . objects . get ( username = username ) , new_web_user