<?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>ユーザー登録 &#8211; WordPress Memo</title>
	<atom:link href="https://blog.riverforest-wp.info/tag/%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%E7%99%BB%E9%8C%B2/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.riverforest-wp.info</link>
	<description>WordPress に関する覚え書き</description>
	<lastBuildDate>Fri, 09 May 2025 12:48:53 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://blog.riverforest-wp.info/wp-content/uploads/2018/05/cropped-icon-256x256-1-32x32.png</url>
	<title>ユーザー登録 &#8211; WordPress Memo</title>
	<link>https://blog.riverforest-wp.info</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>メールアドレスのみのユーザー登録フォームにするプラグイン</title>
		<link>https://blog.riverforest-wp.info/user-mail-only-register/</link>
		
		<dc:creator><![CDATA[Katsushi Kawamori]]></dc:creator>
		<pubDate>Wed, 30 Jan 2019 23:16:34 +0000</pubDate>
				<category><![CDATA[Plugin]]></category>
		<category><![CDATA[プラグイン]]></category>
		<category><![CDATA[メール]]></category>
		<category><![CDATA[ユーザー登録]]></category>
		<category><![CDATA[利用規約]]></category>
		<guid isPermaLink="false">https://blog.riverforest-wp.info/?p=920</guid>

					<description><![CDATA[はじめに 会員制のサイトを構築する際に、固定ページテンプレートにフォームを配し functions.php に処理を書くのが一般的ではないでしょうか？ それは WordPress にデフォルトのユーザー登録フォームはあり [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">はじめに<br></h3>



<p>会員制のサイトを構築する際に、固定ページテンプレートにフォームを配し functions.php に処理を書くのが一般的ではないでしょうか？ それは WordPress にデフォルトのユーザー登録フォームはありますが、ログイン ID とメールアドレスの２つの入力があるためユーザーに負担がかかり、また利用規約の表示とチェックが無いからではないでしょうか？</p>



<p>WordPress のデフォルトのユーザー登録フォームをメールアドレスの入力のみにし、利用規約のチェックを付与するプラグインを作成しました。</p>



<div class="pluginstatsview-card-wrap">
	<div>
		<img decoding="async" src="https://ps.w.org/user-mail-only-register/assets/icon-256x256.png?rev=2021571" alt="Multibyte CAPTCHA login and Mail only register のアイコン" class="pluginstatsview-card-icon" />
		<div class="pluginstatsview-after-icon">
			<div class="pluginstatsview-bold"><a href="https://wordpress.org/plugins/user-mail-only-register/" class="pluginstatsview-astyle">Multibyte CAPTCHA login and Mail only register</a></div>
			<div class="pluginstatsview-small">マルチバイト CAPTCHA ログインフォームとメールのみでのユーザー登録。</div>
			<div class="pluginstatsview-small">作者: <a href="https://profiles.wordpress.org/katsushi-kawamori/">Katsushi Kawamori</a></div>
			<div style="clear: both;"></div>
		</div>
	</div>
	<div style="clear: both;"></div>

	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left"><a href="https://wordpress.org/plugins/user-mail-only-register/#reviews" title="0.0(5点満点中)" class="pluginstatsview-astyle">	<span class="pluginstatsview-stars">
					<span class="dashicons dashicons-star-empty"></span><span class="dashicons dashicons-star-empty"></span><span class="dashicons dashicons-star-empty"></span><span class="dashicons dashicons-star-empty"></span><span class="dashicons dashicons-star-empty"></span>
			</span>
	</a>(0)</span>
		<span class="pluginstatsview-card-right">最終更新: 2日 前</span>
	</div>
	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left">30以上サイトで有効化中</span>
		<span class="pluginstatsview-card-right">検証済み: 7.0</span>
	</div>
	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left">ダウンロード: <a href="https://downloads.wordpress.org/plugin/user-mail-only-register.4.03.zip" class="dashicons dashicons-download pluginstatsview-download"></a></span>
		<span class="pluginstatsview-card-right">リリース: 2019-01-30</span>
	</div>
	<div class="pluginstatsview-small pluginstatsview-card-center">
		2026-03-31 09:30 時点の統計	</div>
</div>



<h3 class="wp-block-heading">使い方</h3>



<p>プラグインを有効化するだけで利用できます。利用規約へのリンクは初期設定ではプライバシーポリシーページにしてあり、設定ページで変更できます。サブドメインの外部サイトに利用規約がある場合を考慮し、URL での指定になっています。チェックボックスをチェックしなければ、エラーが出る仕様になっています。</p>



<figure class="wp-block-image aligncenter"><img fetchpriority="high" loading="eager" decoding="async" width="1024" height="362" src="https://blog.riverforest-wp.info/wp-content/uploads/20190131/register-set-1024x362.png" alt="" class="wp-image-931" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20190131/register-set-1024x362.png 1024w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/register-set-300x106.png 300w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/register-set-768x271.png 768w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/register-set.png 1322w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption"><strong>一般 -&gt; 設定　メンバーシップと新規ユーザーのデフォルト権限グループを設定します。</strong></figcaption></figure>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69cc635f0c45b&quot;}" data-wp-interactive="core/image" data-wp-key="69cc635f0c45b" class="wp-block-image aligncenter wp-lightbox-container"><img loading="lazy" decoding="async" width="964" height="1024" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://blog.riverforest-wp.info/wp-content/uploads/20190131/screenshot-2-964x1024.png" alt="" class="wp-image-1005" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20190131/screenshot-2-964x1024.png 964w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/screenshot-2-282x300.png 282w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/screenshot-2-768x816.png 768w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/screenshot-2-94x100.png 94w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/screenshot-2.png 983w" sizes="auto, (max-width: 964px) 100vw, 964px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="拡大する"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption"><strong>設定ページでは、ログインロゴ、ログインロゴのリンク先、利用規約、の URL を指定できます。また、メール通知の際にログイン情報の前後に表示するテキストを指定できます。このプラグインのメール通知を停止して <a href="https://developer.wordpress.org/reference/hooks/wp_new_user_notification_email/">wp_new_user_notification_email</a> フィルターを使用した独自の通知を行う場合は、チェックを外してください。</strong> </figcaption></figure>



<style>
.simpleblogcard_img_block3e54460fed4f8a85ba54f5af6e7e67bf {
  float: right;
  padding: 10px;
}
.simpleblogcard_border3e54460fed4f8a85ba54f5af6e7e67bf {
  border-left: solid 8px #cd162c;
  padding: 0.25em 0.25em;
  background: transparent;
}
.simpleblogcard_title3e54460fed4f8a85ba54f5af6e7e67bf {
  line-height: 155%;
  font-weight: bold;
  display: block;
}
.simpleblogcard_description3e54460fed4f8a85ba54f5af6e7e67bf {
  line-height: 155%;
  color: #333;
}
</style>
<div class="simpleblogcard_wrap">
			<a style="text-decoration: none;" href=https://blog.riverforest-wp.info/wp_new_user_notification_email/>
				<figure class="simpleblogcard_img_block3e54460fed4f8a85ba54f5af6e7e67bf">
			<img decoding="async" style="border-radius: 5px; width: 100px; height: 66px;" src="https://blog.riverforest-wp.info/wp-content/uploads/eyecatch/filter-300x199.jpg" alt="WordPress で新規ユーザー登録通知メールをカスタマイズするフィルター – WordPress Memo" />
		</figure>
		<div class="simpleblogcard_inner">
		<div class="simpleblogcard_border3e54460fed4f8a85ba54f5af6e7e67bf">
			blog.riverforest-wp.info			<div class="simpleblogcard_title3e54460fed4f8a85ba54f5af6e7e67bf">
				WordPress で新規ユーザー登録通知メールをカスタマイズするフィルター – WordPress Memo			</div>
							<div class="simpleblogcard_description3e54460fed4f8a85ba54f5af6e7e67bf">
					はじめに 新規ユーザー登録時の通知メールのカスタマイズは、WordPress 4.9.0 以前では、wp_new_user_notification という pluggable 関&#8230;				</div>
					</div>
	</div>
	<div style="clear: both;"></div>
	</a>
</div>



<figure class="wp-block-image aligncenter"><img loading="lazy" decoding="async" width="1024" height="554" src="https://blog.riverforest-wp.info/wp-content/uploads/20190131/screenshot-3-1024x554.png" alt="" class="wp-image-937" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20190131/screenshot-3-1024x554.png 1024w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/screenshot-3-300x162.png 300w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/screenshot-3-768x416.png 768w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/screenshot-3.png 1231w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption"><strong>ウィジェットに登録ボタンを設置できます。</strong></figcaption></figure>



<figure class="wp-block-image aligncenter"><img loading="lazy" decoding="async" width="1024" height="557" src="https://blog.riverforest-wp.info/wp-content/uploads/20190131/screenshot-4-1024x557.png" alt="" class="wp-image-938" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20190131/screenshot-4-1024x557.png 1024w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/screenshot-4-300x163.png 300w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/screenshot-4-768x418.png 768w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/screenshot-4.png 1512w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption"><strong>投稿や固定ページ本文にブロックで登録ボタンを設置できます。</strong></figcaption></figure>



<figure class="wp-block-image aligncenter"><img loading="lazy" decoding="async" width="400" height="777" src="https://blog.riverforest-wp.info/wp-content/uploads/20190131/form.png" alt="" class="wp-image-923" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20190131/form.png 400w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/form-154x300.png 154w" sizes="auto, (max-width: 400px) 100vw, 400px" /><figcaption class="wp-element-caption"><strong>登録フォーム　メールアドレスと利用規約</strong></figcaption></figure>



<figure class="wp-block-image aligncenter"><img loading="lazy" decoding="async" width="400" height="861" src="https://blog.riverforest-wp.info/wp-content/uploads/20190131/form-error.png" alt="" class="wp-image-924" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20190131/form-error.png 400w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/form-error-139x300.png 139w" sizes="auto, (max-width: 400px) 100vw, 400px" /><figcaption class="wp-element-caption"><strong>利用規約にチェックを入れないで登録するとエラーが出ます。</strong></figcaption></figure>



<figure class="wp-block-image aligncenter"><img loading="lazy" decoding="async" width="400" height="893" src="https://blog.riverforest-wp.info/wp-content/uploads/20190131/register.png" alt="" class="wp-image-926" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20190131/register.png 400w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/register-134x300.png 134w" sizes="auto, (max-width: 400px) 100vw, 400px" /><figcaption class="wp-element-caption"><strong>登録が完了するとメールが送られます。ログインフォームは「ユーザー名またはメールアドレス」と「パスワード」になっています。</strong></figcaption></figure>



<figure class="wp-block-image aligncenter"><img loading="lazy" decoding="async" width="1024" height="496" src="https://blog.riverforest-wp.info/wp-content/uploads/20190131/register-mail-1024x496.png" alt="" class="wp-image-927" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20190131/register-mail-1024x496.png 1024w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/register-mail-300x145.png 300w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/register-mail-768x372.png 768w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/register-mail.png 1365w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption"><strong>ユーザーには、ログイン先とログイン名、パスワードリセット先を記したメールが送付されます。</strong></figcaption></figure>



<figure class="wp-block-image aligncenter"><img loading="lazy" decoding="async" width="400" height="954" src="https://blog.riverforest-wp.info/wp-content/uploads/20190131/password-reset.png" alt="" class="wp-image-925" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20190131/password-reset.png 400w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/password-reset-126x300.png 126w" sizes="auto, (max-width: 400px) 100vw, 400px" /><figcaption class="wp-element-caption"><strong>パスワードリセットを行ってからログインします。</strong></figcaption></figure>



<figure class="wp-block-image aligncenter"><img loading="lazy" decoding="async" width="1024" height="494" src="https://blog.riverforest-wp.info/wp-content/uploads/20190131/users-1024x494.png" alt="" class="wp-image-929" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20190131/users-1024x494.png 1024w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/users-300x145.png 300w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/users-768x370.png 768w, https://blog.riverforest-wp.info/wp-content/uploads/20190131/users.png 1705w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption"><strong>管理者から登録ユーザーを見ると、ユーザー名とメールアドレスが同じものになっています。</strong></figcaption></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>WordPress で新規ユーザー登録通知メールをカスタマイズするフィルター</title>
		<link>https://blog.riverforest-wp.info/wp_new_user_notification_email/</link>
		
		<dc:creator><![CDATA[Katsushi Kawamori]]></dc:creator>
		<pubDate>Thu, 11 Oct 2018 01:29:34 +0000</pubDate>
				<category><![CDATA[Filter]]></category>
		<category><![CDATA[フィルター]]></category>
		<category><![CDATA[ユーザー登録]]></category>
		<guid isPermaLink="false">https://blog.riverforest-wp.info/?p=512</guid>

					<description><![CDATA[はじめに 新規ユーザー登録時の通知メールのカスタマイズは、WordPress 4.9.0 以前では、wp_new_user_notification という pluggable 関数を用いて可能でしたが、pluggabl [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">はじめに</h2>



<p>新規ユーザー登録時の通知メールのカスタマイズは、WordPress 4.9.0 以前では、wp_new_user_notification という pluggable 関数を用いて可能でしたが、pluggable 関数の性質上制約があり、一工夫が必要でした。WordPress 4.9.0 から、フィルターが導入され使いやすくなりました。記事としてはどこにも紹介されていなようなので、書きます。</p>



<figure class="wp-block-embed is-type-rich is-provider-wp-oembed-blog-card-handler"><div class="wp-block-embed__wrapper">
http://wpdocs.osdn.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/wp_new_user_notification
</div></figure>



<h2 class="wp-block-heading">wp_new_user_notification_email フィルター</h2>



<p>以下の様な使い方をします。第１引数は登録されたユーザーのメール情報を配列[to（メールアドレス）、subject（題名）、message（本文）、headers（ヘッダー）の４つ]、第2引数はユーザーオブジェクト、第３引数はサイトのタイトルを返します。<br>
</p>



<pre class="prism line-numbers"><code class="language-php language-html">add_filter( 'wp_new_user_notification_email', 'regist_user_notify_mail', 10, 3 );
function regist_user_notify_mail( $wp_mail, $user, $blogname ) {

// ユーザー情報を取得
$user_info = get_userdata( $user-&gt;ID );
$unm = $user_info-&gt;user_login;
$pswd = $user_info-&gt;user_pass;

// 題名
$title = sprintf( __('[%s] Your username and password'), $blogname　);

// 本文
$message  = __('Hi there,') . "\r\n\r\n";
$message .= sprintf( __("Welcome to %s! Here's how to log in:"), $blogname　) . "\r\n\r\n";
$message .= wp_login_url() . "\r\n";
$message .= sprintf( __('Username: %s'), $unm ) . "\r\n";
$message .= sprintf( __('If you have any problems, please contact me at %s.'), get_option('admin_email') ) . "\r\n\r\n"

// 配列に格納
$wp_mail['subject'] = $title;
$wp_mail['message'] = $message;

return $wp_mail;

}</code></pre>



<h2 class="wp-block-heading">その他</h2>



<p>管理者あての通知メールの場合は、wp_new_user_notification_email_admin フィルターを使います。使用方法は、上記と同じです。</p>



<h2 class="wp-block-heading">参考</h2>



<figure class="wp-block-embed is-type-rich is-provider-wp-oembed-blog-card-handler"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="jLs1krmzOJ"><a href="https://developer.wordpress.org/reference/hooks/wp_new_user_notification_email/">wp_new_user_notification_email</a></blockquote><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;wp_new_user_notification_email&#8221; &#8212; WordPress Developer Resources" src="https://developer.wordpress.org/reference/hooks/wp_new_user_notification_email/embed/#?secret=BraTcMSoDZ#?secret=jLs1krmzOJ" data-secret="jLs1krmzOJ" width="500" height="282" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div></figure>



<p></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>ユーザー登録を制限するフィルター</title>
		<link>https://blog.riverforest-wp.info/option_users_can_register/</link>
		
		<dc:creator><![CDATA[Katsushi Kawamori]]></dc:creator>
		<pubDate>Mon, 08 Oct 2018 15:09:19 +0000</pubDate>
				<category><![CDATA[Filter]]></category>
		<category><![CDATA[ユーザー登録]]></category>
		<guid isPermaLink="false">https://blog.riverforest-wp.info/?p=501</guid>

					<description><![CDATA[はじめに 現在、WordPress で Webサービスを構築中です。６日間の期限付き使用で、その際に、サーバーを１人のユーザが登録したら占有させたいと思い、option_users_can_register というフィル [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">はじめに</h2>



<p>現在、WordPress で Webサービスを構築中です。６日間の期限付き使用で、その際に、サーバーを１人のユーザが登録したら占有させたいと思い、option_users_can_register というフィルターを使いました。日本語で検索しても出てこないので、入用な方もいるかもしれないと思い書きます。</p>



<h2 class="wp-block-heading">使い方</h2>



<p>投稿者権限で、登録されたメタ情報を探して、それがあれば制限するという事をしています。</p>



<pre class="prism line-numbers"><code class="language-php language-html">add_filter( 'option_users_can_register', 'limit_capa_users' );
function limit_capa_users( $option ) {

if ( FALSE === $option ) return $option;

global $wpdb;
$wp_capa = 'wp_capabilities';
$author = '%%author%%';
$user_id = $wpdb-&gt;get_var($wpdb-&gt;prepare("SELECT user_id
FROM $wpdb-&gt;usermeta
WHERE meta_key = %s
AND meta_value LIKE %s"
, $wp_capa, $author));

if ( $user_id ) return FALSE;

return $option;

}</code></pre>



<h2 class="wp-block-heading">その他</h2>



<p>ユーザー数を登録数で制限させるような事もできます。以下の例ですと１００名以上のユーザー登録で制限されます。</p>



<pre class="prism line-numbers"><code class="language-php language-html">add_filter( 'option_users_can_register', 'limit_capa_user_count' );
function limit_capa_user_count( $option ) {

if ( FALSE === $option ) return $option;

global $wpdb;
$user_count = $wpdb-&gt;get_var("SELECT COUNT(ID) FROM $wpdb-&gt;users");

$limit = 100;
if ( $user_count &gt; $limit ) return FALSE;

return $option;

}</code></pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
