Basically, I am writing a mailing class
$comma = ",";
if (strchr($data['Mail']['receiver_username'], $comma))
{
//remove the commas and create and array of usernames
$email_list = split(",", $data['Mail']['receiver_username']);
foreach ($email_list as $receivers)
{
$receivers_id =
$this->User->getUserIdByUsername($receivers);
$conditions = 'User.id = "'.$receivers_id.'"';
$receivers = $this->User->field('username',
$conditions);
if ($receivers == 'FALSE')
{
//if one of the usernames is false, remove it and
continue with the
rest
}
}
If theres a comma (and hence more than one name listed) I split the
string and create an array.
I need a function in order to weed out usernames that are not in the
database. Any suggestions??
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---