
內容簡介
允許建立、註冊及更新多個具有相同電子郵件地址的使用者帳戶。
預設情況下,WordPress 只允許一個特定的電子郵件地址用於單一使用者帳戶。此外掛移除此限制。
此外掛的設定頁面(透過使用者→多個帳戶或在管理外掛頁面上此外掛旁的設定連結)提供了僅允許某些電子郵件地址能夠擁有多個帳戶的功能(例如如果您只想讓管理員具有此能力;預設上所有電子郵件地址都可以使用超過一次)。您也可以指定每個電子郵件地址所能夠擁有的帳戶數目上限(預設上沒有限制)。
設定頁面還提供了一個表格,列出所有共用電子郵件地址的使用者帳戶(請參閱螢幕截圖)。
亦相容於多站點和 BuddyPress。
連結: 外掛首頁 | 外掛目錄頁面 | 作者首頁
樣板標籤
此外掛提供三個選用的樣板標籤可用於您的佈景主題樣板中使用。
函數
<?php c2c_count_multiple_accounts( $email ); ?>
回傳與給定電子郵件相關聯的使用者數目。
<?php c2c_get_users_by_email( $email ); ?>
回傳與給定電子郵件相關聯的使用者。
<?php c2c_has_multiple_accounts( $email ); ?>
回傳一個布林值,表示給定電子郵件是否與多個使用者帳戶相關聯。
引數
$email(字串)
電子郵件地址。
篩選器
此外掛提供三個可供掛鉤的篩選器。通常,利用這些掛鉤來進行自訂的方式是將其放入您的現行佈景主題的 functions.php 檔案中,或由另一個外掛使用它們。
c2c_count_multiple_accounts (篩選器)
「c2c_count_multiple_accounts」掛鉤允許您使用另一種方法安全調用 c2c_count_multiple_accounts(),以使如果該外掛停用或刪除,則您對該函數的呼叫不會在您的網站中導致錯誤。
引數:
與 c2c_count_multiple_accounts() 相同
範例:
不是:
<?php echo c2c_count_multiple_accounts( $email ); ?>
是:
<?php echo apply_filters( 'c2c_count_multiple_accounts', $email ); ?>
c2c_get_users_by_email (篩選器)
「c2c_get_users_by_email」掛鉤允許您使用另一種方法安全調用 c2c_get_users_by_email(),以使如果該外掛停用或刪除,則您對該函數的呼叫不會在您的網站中導致錯誤。
引數:
與 c2c_get_users_by_email() 相同
範例:
不是:
<?php echo c2c_get_users_by_email( $email ); ?>
是:
<?php echo apply_filters( 'c2c_get_users_by_email', $email ); ?>
c2c_has_multiple_accounts (篩選器)
「c2c_has_multiple_accounts」掛鉤允許您使用另一種方法安全調用 c2c_has_multiple_accounts(),以使如果該外掛停用或刪除,則您對該函數的呼叫不會在您的網站中導致錯誤。
外掛標籤
開發者團隊
原文外掛簡介
Allow multiple user accounts to be created, registered, and updated having the same email address.
By default, WordPress only allows a specific email address to be used for a single user account. This plugin removes that restriction.
The plugin’s settings page (accessed via Users -> Multiple Accounts or via the Settings link next to the plugin on the Manage Plugins page) provides the ability to allow only certain email addresses the ability to have multiple accounts (such as if you only want admins to have that ability; by default all email addresses can be used more than once). You may also specify a limit to the number of accounts an email address can have (by default there is no limit).
The settings page also provides a table listing all user accounts that share email addresses (see screenshot).
Compatible with Multisite and BuddyPress as well.
Links: Plugin Homepage | Plugin Directory Page | Author Homepage
Template Tags
The plugin provides three optional template tags for use in your theme templates.
Functions
Returns a count of the number of users associated with the given email.
Returns the users associated with the given email.
Returns a boolean indicating if the given email is associated with more than one user account.
Arguments
$email (string)
An email address.
Filters
The plugin exposes three filters for hooking. Typically, customizations utilizing these hooks would be put into your active theme’s functions.php file, or used by another plugin.
c2c_count_multiple_accounts (filter)
The ‘c2c_count_multiple_accounts’ hook allows you to use an alternative approach to safely invoke c2c_count_multiple_accounts() in such a way that if the plugin were deactivated or deleted, then your calls to the function won’t cause errors in your site.
Arguments:
same as for c2c_count_multiple_accounts()
Example:
Instead of:
Do:
c2c_get_users_by_email (filter)
The ‘c2c_get_users_by_email’ hook allows you to use an alternative approach to safely invoke c2c_get_users_by_email() in such a way that if the plugin were deactivated or deleted, then your calls to the function won’t cause errors in your site.
Arguments:
same as for c2c_get_users_by_email()
Example:
Instead of:
Do:
c2c_has_multiple_accounts (filter)
The ‘c2c_has_multiple_accounts’ hook allows you to use an alternative approach to safely invoke c2c_has_multiple_accounts() in such a way that if the plugin were deactivated or deleted, then your calls to the function won’t cause errors in your site.
Arguments:
same as for c2c_has_multiple_accounts()
Example:
Instead of:
Do:
