public function recuperaClave($login) { $bd = new bd(); $correo = new email(); if (isset($login["seudonimo"])) { $condicion = "seudonimo = '{$login["seudonimo"]}'"; } else { $condicion = "email = '{$login["email"]}'"; } $result = $bd->doSingleSelect($this->a_table, $condicion); if (!empty($result)) { //if($result["status_usuarios_id"]=='1'){ $email = $result["email"]; $link = $this->generaLinkTemporal($result["usuarios_id"], $result["seudonimo"]); if ($link) { $correo->sendEmail($email, $link); return array(1, $result["usuarios_id"]); } else { return array(2, ""); } //} } else { return array(2, ""); } }
private function emailNotification($notification_id) { $r = $this->getNotifications(null, $notification_id); $row = mysqli_fetch_array($r); $to = $row['ru_email']; $subject = 'MITRE SE - New Notification'; $message = ''; //$message='<img src="http://skillsendorsement-monmouth.rhcloud.com/images/userdp/'. $row['su_userdp'] . ' class="img-responsive voffset2" alt="img" width="60" height="60">'; if ($row['notification_name'] == "project_added") { $message .= '<h3>' . $row['su_fname'] . ' ' . $row['su_lname'] . ':</h3>'; $message .= 'I have added a new project, ' . $row['project_name'] . '. Please approve.'; } if ($row['notification_name'] == "project_approved") { $message .= '<h3><span class="text-capitalize">' . $row['su_fname'] . ' </span><span class="text-capitalize">' . $row['su_lname'] . '</span>:</h3>'; $message .= 'I have approved ' . $row['project_name'] . ' project.'; } if ($row['notification_name'] == "project_disapproved") { $message .= '<h3><span class="text-capitalize">' . $row['su_fname'] . ' </span><span class="text-capitalize">' . $row['su_lname'] . '</span>:</h3>'; $message .= 'I have disapproved ' . $row['project_name'] . ' project.'; } if ($row['notification_name'] == "endorsed") { $message .= '<h3>' . $row['su_fname'] . ' ' . $row['su_lname'] . ':</h3>'; $message .= 'Congratulations! I have endorsed you for ' . $row['skill_name'] . '.'; $message .= '<br/><q>' . $row['comments'] . '</q>'; } $message .= '<br/><br/>Login here: <a href="http://skillsendorsement-monmouth.rhcloud.com">http://skillsendorsement-monmouth.rhcloud.com</a>'; /* echo '<br/><br/><br/><br/><br/><br/>'; echo $subject . '<br/>'; echo $to . '<br/>'; echo $message . '<br/>'; */ // Create an object for email $objEmail = new email(); // Send email $objEmail->sendEmail($to, $subject, $message); }