} // check for valid login if (!$gValidLogin && $getUserId === 0 && $getMsgType === 'PM') { $gMessage->show($gL10n->get('SYS_INVALID_PAGE_VIEW')); } // check if user has email address for sending a email if ($gValidLogin && $getMsgType !== 'PM' && $gCurrentUser->getValue('EMAIL') === '') { $gMessage->show($gL10n->get('SYS_CURRENT_USER_NO_EMAIL', '<a href="' . $g_root_path . '/adm_program/modules/profile/profile.php">', '</a>')); } // Update the read status of the message if ($getMsgId > 0) { // update the read-status $message->setReadValue($gCurrentUser->getValue('usr_id')); $getSubject = $message->getValue('msg_subject'); $getUserId = $message->getConversationPartner($gCurrentUser->getValue('usr_id')); $messageStatement = $message->getConversation($getMsgId); } $maxNumberRecipients = 1; if ($gPreferences['mail_max_receiver'] > 0 && $getMsgType !== 'PM') { $maxNumberRecipients = $gPreferences['mail_max_receiver']; } $list = array(); if ($gValidLogin && $getMsgType === 'PM' && count($gCurrentUser->getAllVisibleRoles()) > 0) { $sql = 'SELECT usr_id, FIRST_NAME.usd_value as first_name, LAST_NAME.usd_value as last_name, usr_login_name FROM ' . TBL_MEMBERS . ' INNER JOIN ' . TBL_ROLES . ' ON rol_id = mem_rol_id INNER JOIN ' . TBL_CATEGORIES . ' ON cat_id = rol_cat_id INNER JOIN ' . TBL_USERS . ' ON usr_id = mem_usr_id