function _webform_confirm_email_strip_name in Webform Confirm Email Address 6
Same name and namespace in other branches
- 6.2 webform_confirm_email.module \_webform_confirm_email_strip_name()
Takes email address of the form bob <bob@example.com> and returns bob@example.com If only supplied bob@example.com it returns that
Parameters
$email: Email address to be cleaned up.
Return value
Plain email address (removing name and <>).
1 call to _webform_confirm_email_strip_name()
- _webform_confirm_email_get_sid in ./
webform_confirm_email.module - Get submission ID given
File
- ./
webform_confirm_email.module, line 131 - Add email confirmation rules to webforms used as letter campaigns
Code
function _webform_confirm_email_strip_name($email) {
if ('>' !== substr($email, -1)) {
return $email;
}
list(, $email) = explode(' <', $email, 2);
return substr($email, 0, -1);
}