<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>注册归档 - 猪 i0oo0</title>
	<atom:link href="https://i0oo0.com/tag/%E6%B3%A8%E5%86%8C/feed/" rel="self" type="application/rss+xml" />
	<link>https://i0oo0.com/tag/注册/</link>
	<description>爱猪</description>
	<lastBuildDate>Tue, 19 Feb 2019 21:25:18 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.5</generator>

<image>
	<url>https://i0oo0.com/wp-content/uploads/2019/02/favicon-2.png</url>
	<title>注册归档 - 猪 i0oo0</title>
	<link>https://i0oo0.com/tag/注册/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>WordPress中文用户名报错</title>
		<link>https://i0oo0.com/2019/02/19/wordpress%e4%b8%ad%e6%96%87%e7%94%a8%e6%88%b7%e5%90%8d%e6%8a%a5%e9%94%99/</link>
					<comments>https://i0oo0.com/2019/02/19/wordpress%e4%b8%ad%e6%96%87%e7%94%a8%e6%88%b7%e5%90%8d%e6%8a%a5%e9%94%99/#respond</comments>
		
		<dc:creator><![CDATA[大猪帆]]></dc:creator>
		<pubDate>Tue, 19 Feb 2019 21:25:18 +0000</pubDate>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[报错]]></category>
		<category><![CDATA[注册]]></category>
		<category><![CDATA[用户名]]></category>
		<guid isPermaLink="false">https://i0oo0.com/?p=10</guid>

					<description><![CDATA[<p>				可是WordPress默认会认定除了英文字母、数字和标点之外的用户名都是不规范的。所以并不会允许注册。会告诉你“错误：此用户名包含无效字符，请输入有效的用户名。”<br />
已经存在的中文名，在修改资料的时候也会发生问题：WordPress会对中文视而不见，它会认为你的用户名是空的，告诉你“不能创建登录名为空的用户。”		</p>
<p><a href="https://i0oo0.com/2019/02/19/wordpress%e4%b8%ad%e6%96%87%e7%94%a8%e6%88%b7%e5%90%8d%e6%8a%a5%e9%94%99/">WordPress中文用户名报错</a>最先出现在<a href="https://i0oo0.com">猪 i0oo0</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>				在安装WordPress的时候，管理员用户名选择了中文。这样做可以防止有坏人暴力破解密码，例如当用户名设置为Admin或Administrator之类默认的时候，基本会成为低成本黑客的众矢之的。基本操作就是他们手里大概有成千上万的IP号，有可能是买的IP号，也有可能是用病毒污染防御力低的电脑进而控制它们、不过大部分是通过VPN、http代理等不断改变IP。然后他们用这些IP号去不断尝试密码，一个IP号可能试3次就会被暂时冻结，不过黑客可以源源不断的轮流换IP去试，就很危险。但是如果黑客不知道你的用户名，那他就需要先试你的用户名，例如Jack、Lily之类常用的名字。这个时候如果选一个中文用户名就会大大增加破解的难度，有了用户名还要从头开始试密码，低成本黑客八成就会望而却步。i0oo0</p>
<p>可是WordPress默认会认定除了<span style="color: #3366ff;">英文字母</span>、<span style="color: #3366ff;">数字</span>和<span style="color: #3366ff;">标点</span>之外的用户名都是<span style="color: #ff0000;">不规范</span>的。所以并不会允许注册。会告诉你“错误：此用户名包含无效字符，请输入有效的用户名。”</p>
<figure id="attachment_11" aria-describedby="caption-attachment-11" style="width: 259px" class="wp-caption aligncenter"><img fetchpriority="high" decoding="async" class="wp-image-11 size-medium" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.34.46-PM-2-259x300.png" alt="中文用户名报错截图" width="259" height="300" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.34.46-PM-2-259x300.png 259w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.34.46-PM-2.png 684w" sizes="(max-width: 259px) 100vw, 259px" /><figcaption id="caption-attachment-11" class="wp-caption-text">中文用户名报错</figcaption></figure>
<p>已经存在的中文名，在修改资料的时候也会发生问题：WordPress会对中文视而不见，它会认为你的用户名是空的，告诉你“不能创建登录名为空的用户。”</p>
<figure id="attachment_12" aria-describedby="caption-attachment-12" style="width: 300px" class="wp-caption aligncenter"><img decoding="async" class="size-medium wp-image-12" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.39.04-PM-2-300x179.png" alt="用户名为空错误的截图" width="300" height="179" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.39.04-PM-2-300x179.png 300w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.39.04-PM-2.png 530w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-12" class="wp-caption-text">“用户名为空”错误</figcaption></figure>
<h4><span style="color: #008000;">解决方法是：</span></h4>
<p>打开你的博客对应的文件目录，可以是在线文件管理，也可以通过FTP或者SFTP等途径连接到服务器。在博客目录下打开<span style="color: #ff0000;"><strong>wp-includes</strong></span>那个文件夹，找到<span style="color: #ff0000;"><strong>formatting.php</strong></span>这个文件然后编辑它，摁下command+F (Windows应该是control+F)进行搜索，找到<span style="color: #ff0000;"><strong>function sanitize_user( $username, $strict = false ) {</strong></span> 这一行，然后再下面紧挨着写一句指令<strong><span style="color: #ff0000;">$strict = false;</span></strong> （意思就是让WordPress不要太严肃嘛，任何用户名都是欢迎滴）然后保存就可以了。</p>
<figure id="attachment_13" aria-describedby="caption-attachment-13" style="width: 640px" class="wp-caption aligncenter"><img decoding="async" class="wp-image-13 size-large" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.56.42-PM-2-1024x340.png" alt="添加代码后的截图" width="640" height="213" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.56.42-PM-2-1024x340.png 1024w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.56.42-PM-2-300x100.png 300w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.56.42-PM-2-768x255.png 768w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.56.42-PM-2.png 1254w" sizes="(max-width: 640px) 100vw, 640px" /><figcaption id="caption-attachment-13" class="wp-caption-text">添加代码的截图</figcaption></figure>
<p>从此之后，注册用户名，修改资料，就都可以使用中文用户名了</p>
<div style="float: left;">
<figure id="attachment_14" aria-describedby="caption-attachment-14" style="width: 300px" class="wp-caption alignleft"><img loading="lazy" decoding="async" class="size-medium wp-image-14" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.59.46-PM-2-300x182.png" alt="资料修改成功截图" width="300" height="182" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.59.46-PM-2-300x182.png 300w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.59.46-PM-2.png 304w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-14" class="wp-caption-text">个人资料修改成功</figcaption></figure>
<div style="float: left;">
<figure id="attachment_15" aria-describedby="caption-attachment-15" style="width: 300px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-medium wp-image-15" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.00.40-PM-2-300x280.png" alt="中文用户名注册成功截图" width="300" height="280" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.00.40-PM-2-300x280.png 300w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.00.40-PM-2.png 738w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-15" class="wp-caption-text">中文用户名注册成功</figcaption></figure>
</div>
<p>就酱。</p>
</div>
<p><a href="https://i0oo0.com/2019/02/19/wordpress%e4%b8%ad%e6%96%87%e7%94%a8%e6%88%b7%e5%90%8d%e6%8a%a5%e9%94%99/">WordPress中文用户名报错</a>最先出现在<a href="https://i0oo0.com">猪 i0oo0</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://i0oo0.com/2019/02/19/wordpress%e4%b8%ad%e6%96%87%e7%94%a8%e6%88%b7%e5%90%8d%e6%8a%a5%e9%94%99/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
