Compare commits

..

No commits in common. "18328f9d07cea1c0b91057dfa6c3a4f3471e3f7a" and "807b1d579656b4d8948d33c26a7f89dc259dcfff" have entirely different histories.

View file

@ -4,7 +4,7 @@
* Plugin Name: Efabi.net Core Plugin * Plugin Name: Efabi.net Core Plugin
* Plugin URI: https://github.com/rpi-virtuell/rpi-newsletter * Plugin URI: https://github.com/rpi-virtuell/rpi-newsletter
* Description: Efabi.net Hauptplugin * Description: Efabi.net Hauptplugin
* Version: 1.0.1 * Version: 1.0
* Author: reintanz * Author: reintanz
* Author URI: https://github.com/FreelancerAMP * Author URI: https://github.com/FreelancerAMP
* License: GPL2 or later * License: GPL2 or later
@ -14,8 +14,8 @@ class EfabiNetCore
{ {
public function __construct() public function __construct()
{ {
add_action('wp_login', array($this, 'register_new_user_on_login')); add_action('wp_login', array($this, 'register_new_user_on_login'));
add_shortcode('efabinetcore_debug', array($this, 'register_new_user_on_login'));;
} }
public function register_new_user_on_login() public function register_new_user_on_login()
@ -26,16 +26,14 @@ class EfabiNetCore
'post_type' => 'profil', 'post_type' => 'profil',
'numberposts' => -1, 'numberposts' => -1,
'meta_query' => 'meta_query' =>
array(
array( array(
'key' => 'user_id', 'key' => 'user_id',
'value' => $user->ID, 'value' => $user->ID,
'compare' => '=' 'compare' => '='
) )
)
); );
$profile = get_posts($args); $profil = get_posts($args);
if (count($profile) == 0) { if (count($profil) == 0) {
// Kein Profil gefunden, neues Profil erstellen // Kein Profil gefunden, neues Profil erstellen
$new_profil = array( $new_profil = array(
'post_title' => $user->user_login, 'post_title' => $user->user_login,