We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

FR: cp_members_validate_members, add validated member id

Developer Preview

Manuel Payano's avatar
Manuel Payano
144 posts
9 years ago
Manuel Payano's avatar Manuel Payano

Hi,

Now in EE3 the cp_members_validate_members is a bit hard to use.

The hook has no parameters and there is no easy way to know which member(s) where actually validated.

It would be great if an array of member_id’s could be passed.

The way i do it now just seems unnecessary and error-prone.

$ids = array();
$last_segment = end(ee()->uri->segments);

if (isset($_POST['selection']) && ee()->input->post('bulk_action') == 'approve') {
    if (is_array($_POST['selection'])) {
        $ids = ee()->input->post('selection');
    }
} else {
    if (ctype_digit($last_segment)) {
        $ids[] = $last_segment;
    }
}

A perfect example is member_register_validate_members, it does give you the member_id.

       
Wes Baker's avatar
Wes Baker
343 posts
9 years ago
Wes Baker's avatar Wes Baker

Manuel,

Seems strange that we don’t pass in the member IDs. I’ll go ahead and add them.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.