Disable wordpress openid client22 March 2009, 22:03:14 |
Sometimes, you need to disable user registration on your blog, for example, if you use wp-invites and registered-users-only-2 plugins.
WordPress allows you to disable user registration on blog, but hacks through (when users leave comments with openid) it and adds new users.
If you want to disable it, you can just disable openid client side (you will still be able to use wordpress blog as openid server, but users’s comments with openid wil be processed as simple comments).
Mini plugin to disable openid plugin client side is in the bottom of the post.
By the way, you can just remove file “coments.php” and calls to this file, but you’ll have to do it again with every update.
Иногда вам требуется отключить регистрацию пользователей на своём блоге, например, если вы используете плагины wp-invites и registered-users-only-2.
WordPress разрешает отключить регистрацию новых пользователей, но при комментировании постов проходит сквозь эту защиту и всё равно создаёт пользователей.
Если вы хотите избежать этого, вы можете просто отключить клиентскую сторону плагина openid (вы сможете использовать ваш блог как openid сервер, но комментарии с openid будут обрабатываться как обычные).
Мини плагин, который поможет это сделать, внизу поста.
Кстати, можно просто удалить файл “comments.php” и его включения, но это придётся повторять каждый раз при обновлении плагина.
WordPress allows you to disable user registration on blog, but hacks through (when users leave comments with openid) it and adds new users.
If you want to disable it, you can just disable openid client side (you will still be able to use wordpress blog as openid server, but users’s comments with openid wil be processed as simple comments).
Mini plugin to disable openid plugin client side is in the bottom of the post.
By the way, you can just remove file “coments.php” and calls to this file, but you’ll have to do it again with every update.
Иногда вам требуется отключить регистрацию пользователей на своём блоге, например, если вы используете плагины wp-invites и registered-users-only-2.
WordPress разрешает отключить регистрацию новых пользователей, но при комментировании постов проходит сквозь эту защиту и всё равно создаёт пользователей.
Если вы хотите избежать этого, вы можете просто отключить клиентскую сторону плагина openid (вы сможете использовать ваш блог как openid сервер, но комментарии с openid будут обрабатываться как обычные).
Мини плагин, который поможет это сделать, внизу поста.
Кстати, можно просто удалить файл “comments.php” и его включения, но это придётся повторять каждый раз при обновлении плагина.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | <?php /* Plugin Name: Disable openid Client Plugin URI: http://jehy.ru/wp-plugins.html Description: Disable openid user registration Version: 0.01 Author: Jehy Author URI: http://jehy.ru */ add_action('init','remove_openid_client',99); function remove_openid_client() { remove_action( 'preprocess_comment', 'openid_process_comment', -90); add_action('preprocess_comment', 'akismet_auto_check_comment', 1); remove_action( 'akismet_spam_caught', 'openid_akismet_spam_caught'); remove_action( 'comment_post', 'update_comment_openid', 5 ); remove_filter( 'option_require_name_email', 'openid_option_require_name_email' ); remove_action( 'sanitize_comment_cookies', 'openid_sanitize_comment_cookies', 15); remove_action( 'openid_finish_auth', 'openid_finish_comment', 10, 2 ); remove_filter('pre_comment_approved', 'openid_comment_approval'); remove_filter( 'get_comment_author_link', 'openid_comment_author_link'); remove_action( 'wp_head', 'openid_js_setup', 9); remove_action( 'wp_footer', 'openid_comment_profilelink', 10); remove_action( 'wp_footer', 'openid_comment_form', 10); remove_filter( 'openid_user_data', 'openid_get_user_data_form', 6, 2); remove_action( 'delete_comment', 'unset_comment_openid' ); remove_action( 'init', 'openid_recent_comments'); } ?> |
| Tags: openid, wordpress | Comments [ 2 ] |

Subscribe? Sure? What for?

23 March at 2:29 am
I’ve left a lengthy reply on you post to the WordPress support forums:
5 October at 12:33 pm
Hi! I’ve tried your plugin but still can see OpenID field in login and register forms.
Though I’ve decided to use phpMyId on my site because currently it does exactly what I need and nothing else.
Anyway thanks for all your thoughts on wordpress forums. Read them all :)