Microweber\Providers\UserManager::after_register PHP Method

after_register() public method

public after_register ( $user_id, $suppress_output = true )
    public function after_register($user_id, $suppress_output = true)
    {
        if ($suppress_output == true) {
            ob_start();
        }
        $data = $this->get_by_id($user_id);
        if (!$data) {
            return;
        }
        $notif = array();
        $notif['module'] = 'users';
        $notif['rel_type'] = 'users';
        $notif['rel_id'] = $user_id;
        $notif['title'] = 'New user registration';
        $notif['description'] = 'You have new user registration';
        $notif['content'] = 'You have new user registered with the username [' . $data['username'] . '] and id [' . $user_id . ']';
        $this->app->notifications_manager->save($notif);
        $this->app->log_manager->save($notif);
        $this->register_email_send($user_id);
        $this->app->event_manager->trigger('mw.user.after_register', $data);
        if ($suppress_output == true) {
            ob_end_clean();
        }
    }