aboutsummaryrefslogtreecommitdiff
path: root/src/CamilStaps/BotleaguesApi/PasswordReminder.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/CamilStaps/BotleaguesApi/PasswordReminder.php')
-rw-r--r--src/CamilStaps/BotleaguesApi/PasswordReminder.php40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/CamilStaps/BotleaguesApi/PasswordReminder.php b/src/CamilStaps/BotleaguesApi/PasswordReminder.php
deleted file mode 100644
index a129dc8..0000000
--- a/src/CamilStaps/BotleaguesApi/PasswordReminder.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/**
- * Created by PhpStorm.
- * User: camilstaps
- * Date: 13-5-15
- * Time: 13:12
- */
-
-namespace CamilStaps\BotleaguesApi;
-
-
-use Illuminate\Database\Eloquent\Model;
-use Illuminate\Support\Facades\Mail;
-
-class PasswordReminder extends Model {
-
- protected $table = 'password_reminders';
- protected $hidden = ['token'];
- protected $fillable = ['userId', 'token', 'valid_till'];
-
- /**
- * Override the parent's save() function to automatically update the valid_till timestamp, and send an email
- */
- public function save(array $options = array()) {
- $this->valid_till = date("Y-m-d H:i:s", time() + 3600);
-
- $user = User::find($this->userId);
- Mail::send('packages.camil-staps.botleagues-api.emails.auth.reminder', ['token' => $this->token], function($message) use ($user) {
- $message->to($user->email, "User " . $user->id);
- });
-
- return parent::save($options);
- }
-
- /**
- * Disable updated_at timestamp
- */
- public function setUpdatedAtAttribute($value) {}
-
-} \ No newline at end of file