PasswordHasBeenResetEmail::getHTMLBody()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
1
<?php
2
require_once('class.FlipsideProfileEmail.php');
3
4
class PasswordHasBeenResetEmail extends FlipsideProfileEmail
5
{
6
    protected $ip_addr;
7
    protected $forwarded_for;
8
 
9
    public function __construct($user, $ip_addr, $forwarded_for = false)
10
    {
11
        parent::__construct($user);
12
        $this->ip_addr = $ip_addr;
13
        if($forwarded_for !== false)
14
        {
15
            $this->forwarded_for = 'Behind Proxy: '.$forwarded_for;
16
        }
17
        else
18
        {
19
            $this->forwarded_for = '';
20
        }
21
        $this->addToAddress($user->mail, $user->displayName);
22
    }
23
24
    public function getSubject()
25
    {
26
        return 'Burning Flipside Password Reset Notification';
27
    }
28
29
    public function getHTMLBody()
30
    {
31
        return 'Someone (quite possibly you) has changed your Flipside password.<br/>
32
                If you did not request this change please notify the technology team ([email protected]).<br/>
33
                IP Address: '.$this->ip_addr.'<br/>
34
                '.$this->forwarded_for.'<br/>
35
                Thank you,<br/>
36
                Burning Flipside Technology Team';
37
    }
38
39
    public function getTextBody()
40
    {
41
        return 'Someone (quite possibly you) has changed your Flipside password.
42
                If you did not request this change please notify the technology team ([email protected]).
43
                IP Address: '.$this->ip_addr.'
44
                '.$this->forwarded_for.'
45
                Thank you,
46
                Burning Flipside Technology Team';
47
    }
48
}
49
/* vim: set tabstop=4 shiftwidth=4 expandtab: */
50