def create_user(backend, details, response, uid, username, user=None, *args, **kwargs):
if user:<EOL><INDENT>return {'<STR_LIT:user>': user}<EOL><DEDENT>if not username:<EOL><INDENT>return None<EOL><DEDENT>email = details.get('<STR_LIT:email>')<EOL>original_email = None<EOL>if not email:<EOL><INDENT>message = _("""<STR_LIT>""")<EOL>raise AuthFailed(backend, message)<EOL><DEDENT>if email and len(email) > <NUM_LIT>:<EOL><INDENT>original_email = email<EOL>email = '<STR_LIT>'<EOL><DEDENT>return {<EOL>'<STR_LIT:user>': UserSocialAuth.create_user(username=username,<EOL>email=email,<EOL>sync_emailaddress=False),<EOL>'<STR_LIT>': original_email,<EOL>'<STR_LIT>': True<EOL>}<EOL>
Creates user. Depends on get_username pipeline.