From 7076343338ae3439f3c86f01144818abe8c31978 Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Sun, 12 Mar 2023 07:16:23 +0200 Subject: add container helpers; constuct public directory-tree --- classes/User.php | 111 ------------------------------------------------------- 1 file changed, 111 deletions(-) delete mode 100644 classes/User.php (limited to 'classes/User.php') diff --git a/classes/User.php b/classes/User.php deleted file mode 100644 index 65b5018..0000000 --- a/classes/User.php +++ /dev/null @@ -1,111 +0,0 @@ - '', - 'name' => '', - 'middle'=> '', - 'surname' =>'', - 'email' => '' - ); - - private $addresses = Array(); - - - - /** METHODS - * ------------------------------------------------------------------------- - */ - - - public function create() - { - - } - - - public function setDefaultAddress($id) - { - - } - - - public function addAddress() - { - // update session data - // update user record - } - - - public function changePassword() - { - - } - - - public function confirmEmail() - { - - } - - - public function sendEmail() - { - - } - - /** sendOTP() - * sent One-Time-Password - * - */ - public function sendOTP($ttl) - { - $to = $this->who; - $otp = rand(10000,99999); - $expire = time() + $ttl; - - $mail = new PHPMailer(true); - try { - //Server settings - // ... - - //Recipients - $mail->setFrom('from@example.com', 'Mailer'); - $mail->addAddress($to['email'], $to['surname'] .' '. $to['name']); //Add a recipient - $mail->addReplyTo('info@example.com', 'Information'); - - //Attachments - $mail->addAttachment('/var/tmp/file.tar.gz'); //Add attachments - $mail->addAttachment('/tmp/image.jpg', 'new.jpg'); //Optional name - - //Content - $mail->isHTML(true); //Set email format to HTML - $mail->Subject = 'Your OTP'; - $mail->Body = 'This is the HTML message body in bold!'; - $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; - - $mail->send(); - echo 'Message has been sent'; - } catch (Exception $e) { - echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; - } - - } - - /** updateSession() - * regenerates session - */ - public function updateSession() - { - - } - -} -- cgit v1.2.3