跳至主要內容
  • 關於 WordPress
    • 關於 WordPress
    • WordPress.org 台灣繁體中文
    • 線上說明
    • 技術支援
    • 意見反應
  • 登入
  • 註冊
WordPress.org
WordPress.org

Taiwan 正體中文

  • 佈景主題目錄
  • 外掛目錄
  • 最新消息
  • 技術支援
  • 關於我們
  • 團隊
  • 取得 WordPress
取得 WordPress

外掛目錄

  • 我的最愛
  • Beta 版測試
  • 開發者資訊
下載

Magic Login Mail

由 Katsushi Kawamori 開發
  • 詳細資料
  • 使用者評論
  • 安裝方式
  • 技術支援
  • 開發資訊

外掛說明

使用者輸入電子郵件地址,系統便會傳送給使用者一封包含不需密碼即可登入的特殊連結的電子郵件。

Login

  • Login with email address only.
  • Only registered users can login.
  • Password-less login from the magic link notified in the email.
  • shortcode : [magic_login]
  • action hook : do_action( 'magic_email_send', $emails | array, true | bool ) : To send the magic link simultaneously from the management account.

Thanks

  • This plugin is a modified version of Passwordless Login.
  • The main changes are the addition of various filter hooks and the addition of the following action hooks.

Action hook

  • This is for sending bulk e-mails with a magic link for login to multiple accounts from the management screen.
  • When using this action hook, the URL of the page where the shortcode [magic_login] is placed should be specified in the filter hook ‘magic_login_mail_url’.
/** ==================================================
 * To send the magic link simultaneously from the management account.
 *
 * @param array  $emails  Multiple email addresses.
 * @param bool   true  Output notifications to the management screen immediately after sending.
 */
do_action( 'magic_email_send', $emails, true );

Filter hooks

/** ==================================================
 * Filter for magic link url with mail.
 *
 */
add_filter( 'magic_login_mail_url', function(){ return 'url'; }, 10, 1 );
/** ==================================================
 * Currently logged in user link for Magic Login Mail
 *
 * @param string $url  URL.
 * @param int    $user_id  User ID.
 * @return $url
 */
add_filter( 'magic_login_mail_user_redirect', 'redirect_url_login_users', 10, 2 );

/** ==================================================
 * Login user after redirect for Magic Login Mail
 *
 * @param string $url  URL.
 * @param int    $user_id  User ID.
 * @return $url
 */
add_filter( 'magic_login_mail_after_login_redirect', 'redirect_url_login_users', 10, 2 );

function redirect_url_login_users( $url, $user_id ){
    /* your code */
    return $url;
}
/** ==================================================
 * Filter for message with shortcode form.
 *
 */
add_filter( 'magic_login_mail_success_link_msg', function(){ return 'Message for success.'; }, 10, 1 );
add_filter( 'magic_login_mail_success_login_msg', function(){ return 'Message for success with login.'; }, 10, 1 );
add_filter( 'magic_login_mail_valid_errors', function(){ return 'Message for mail validation error.'; }, 10, 1 );
add_filter( 'magic_login_mail_email_errors', function(){ return 'Message for sent mail error.'; }, 10, 1 );
add_filter( 'magic_login_mail_invalid_token_error', function(){ return 'Message for token error.'; }, 10, 1 );
add_filter( 'magic_login_mail_form_label', function(){ return 'Message for form label.'; }, 10, 1 );
/** ==================================================
 * Filter for color with shortcode form.
 *
 */
add_filter( 'magic_login_mail_success_link_msg_back_color', function(){ return '#e7f7d3'; }, 10, 1 );
add_filter( 'magic_login_mail_success_login_msg_back_color', function(){ return '#e7f7d3'; }, 10, 1 );
add_filter( 'magic_login_mail_valid_errors_back_color', function(){ return '#ffebe8'; }, 10, 1 );
add_filter( 'magic_login_mail_email_errors_back_color', function(){ return '#ffebe8'; }, 10, 1 );
add_filter( 'magic_login_mail_invalid_token_error_back_color', function(){ return '#ffebe8'; }, 10, 1 );
/** ==================================================
 * Filter for input text size.
 *
 */
add_filter( 'magic_login_mail_input_size', function(){ return 17; }, 10, 1 );
/** ==================================================
 * Filter for class name.
 *
 */
add_filter( 'magic_login_mail_label_class_name', function(){ return 'mylabel'; }, 10, 1 );
add_filter( 'magic_login_mail_input_class_name', function(){ return 'myinput'; }, 10, 1 );
add_filter( 'magic_login_mail_submit_class_name', function(){ return 'mysubmit'; }, 10, 1 );
/** ==================================================
 * Filter for message with mail.
 *
 */
add_filter( 'magic_login_mail_subject', function(){ return 'subject'; }, 10, 1 );
add_filter( 'magic_login_mail_message', function(){ return 'Message with magic link.'; }, 10, 1 );
/** ==================================================
 * Filter for login expiration.
 *
 */
add_filter( 'magic_login_mail_expiration', function(){ return 10; }, 10, 1 );

螢幕擷圖

  • Login form by shortcode
  • Login form
  • Login success
  • Email with magic link
  • Login error with no user
  • Login error with expired token

安裝方式

  1. Upload magic-login-mail directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

常見問題集

none

使用者評論

5.9.1 compatible passwordless login

skillsharejp 2022 年 3 月 5 日
This is a fork of Passwordless Login which stopped its development which is compatible with latest WP versions including 5.9.1. Thank you so much for maintaining!!
閱讀全部 1 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Magic Login Mail〉的開發相關工作。

參與者
  • Katsushi Kawamori

Magic Login Mail 外掛目前已有 2 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Magic Login Mail〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄。

變更記錄

1.03

Added an option to save sent emails.

1.02

Changed input size.

1.01

Supported GlotPress.

1.00

Initial release.

中繼資料

  • 最新版本: 1.03
  • 最後更新: 1 週前
  • 啟用安裝數: 40+
  • WordPress 版本需求: 4.7 或更新版本
  • 已測試相容的 WordPress 版本: 6.0
  • PHP 版本需求: 7.0 或更新版本
  • 語言:

    Chinese (Taiwan)、English (US)、及 Japanese.

    將這個外掛本地化為你的母語版本

  • 標籤:
    emailloginpasswordlessusers
  • 進階檢視

評分

檢視全部
  • 5 星 1
  • 4 星 0
  • 3 星 0
  • 2 星 0
  • 1 星 0
登入以提交評論

參與者

  • Katsushi Kawamori

技術支援

最近 2 個月解決的問題:

總計 1 個問題,已解決 0 個

檢視技術支援論壇

贊助

想要支援這個外掛的發展嗎?

贊助這個外掛

  • 關於我們
  • 最新消息
  • 主機託管
  • 贊助基金會
  • 技術支援
  • 開發者資源
  • 共同參與
  • Learn
  • 展示網站
  • 外掛目錄
  • 佈景主題目錄
  • 區塊版面配置目錄
  • WordCamp
  • WordPress.TV
  • BuddyPress
  • bbPress
  • WordPress.com
  • Matt
  • 隱私權
  • Public Code
WordPress.org
WordPress.org

Taiwan 正體中文

  • 造訪我們的 Facebook 粉絲專頁
  • 造訪我們的 Twitter 帳號
程式碼,如詩