PluginProbe
WP Directory Kit / 1.4.8
WP Directory Kit v1.4.8
1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 1.4.0 All 36 releases
← All changes | actions.php +18 -0 1.5.31.4.8 View file →
@@ -112,8 +112,26 @@
112 112 ));
113 113 });
114 114
115 115
116 +add_action( 'init', function () {
117 + if (substr_count($_SERVER['REQUEST_URI'], 'auto-login') && isset( $_GET['user_id'], $_GET['token'] ) ) {
118 + $user_id = (int) $_GET['user_id'];
119 + $token = sanitize_text_field( $_GET['token'] );
120 +
121 + if ( $token == substr(md5($user_id.NONCE_KEY.'wpdirectorykit'),0,10)) {
122 +
123 + wp_set_auth_cookie( $user_id );
124 + wp_redirect( home_url() );
125 + exit;
126 + } else {
127 + wp_die( 'Wrong token.' );
128 + }
129 + }
130 +});
131 +
132 +
133 +
116 134 add_filter('posts_clauses', function($clauses, $query) {
117 135 global $wpdb;
118 136
119 137 if (