[ SYSTEM ]: Linux wordpress 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
[ SERVER ]: Apache/2.4.66 (Debian) | PHP: 8.2.30
[ USER ]: www-data | IP: 172.19.30.54
GEFORCE FILE MANAGER
/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
suretriggers
/
src
/
Integrations
/
wordpress
/
actions
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 add-new-media.php
3,538 B
SET
[ EDIT ]
|
[ DEL ]
📄 add-new-role.php
1,974 B
SET
[ EDIT ]
|
[ DEL ]
📄 add-tag-to-post.php
3,028 B
SET
[ EDIT ]
|
[ DEL ]
📄 add-taxonomy-to-post.php
5,804 B
SET
[ EDIT ]
|
[ DEL ]
📄 find-user-by-email.php
2,361 B
SET
[ EDIT ]
|
[ DEL ]
📄 find-user-by-id.php
2,281 B
SET
[ EDIT ]
|
[ DEL ]
📄 find-user-meta-by-key.php
2,308 B
SET
[ EDIT ]
|
[ DEL ]
📄 find-user-metas.php
2,068 B
SET
[ EDIT ]
|
[ DEL ]
📄 get-taxonomy-by-name.php
2,030 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: find-user-by-email.php
<?php /** * FindUserByEmail. * php version 5.6 * * @category FindUserByEmail * @package SureTriggers * @author BSF <username@example.com> * @license https://www.gnu.org/licenses/gpl-3.0.html GPLv3 * @link https://www.brainstormforce.com/ * @since 1.0.0 */ namespace SureTriggers\Integrations\WordPress\Actions; use SureTriggers\Integrations\AutomateAction; use SureTriggers\Traits\SingletonLoader; use SureTriggers\Integrations\WordPress\WordPress; use Exception; /** * FindUserByEmail * * @category FindUserByEmail * @package SureTriggers * @author BSF <username@example.com> * @license https://www.gnu.org/licenses/gpl-3.0.html GPLv3 * @link https://www.brainstormforce.com/ * @since 1.0.0 */ class FindUserByEmail extends AutomateAction { /** * Integration type. * * @var string */ public $integration = 'WordPress'; /** * Action name. * * @var string */ public $action = 'find_user_by_email'; use SingletonLoader; /** * Register action. * * @param array $actions action data. * @return array */ public function register( $actions ) { $actions[ $this->integration ][ $this->action ] = [ 'label' => __( 'Find User By Email', 'suretriggers' ), 'action' => 'find_user_by_email', 'function' => [ $this, 'action_listener' ], ]; return $actions; } /** * Action listener. * * @param int $user_id user_id. * @param int $automation_id automation_id. * @param array $fields fields. * @param array $selected_options selected_options. * @return array * @throws Exception Exception. */ public function _action_listener( $user_id, $automation_id, $fields, $selected_options ) { $response = []; $wp_user_email = $selected_options['user_email']; $user_exist = get_user_by( 'email', $wp_user_email ); if ( ! $user_exist ) { $response['user_exist'] = 'no'; } else { $wp_user_id = $user_exist->ID; $user = WordPress::get_user_context( $wp_user_id ); $all_meta = (array) get_user_meta( $wp_user_id ); foreach ( $all_meta as $key => $meta ) { $meta = (array) $meta; $response[ 'meta_' . $key ] = $meta[0]; } $response['user_exist'] = 'yes'; $response = array_merge( $user, $response ); } return $response; } } FindUserByEmail::get_instance();