Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

email.php

Zuletzt modifiziert: 09.10.2024, 12:54 - Dateigröße: 1.52 KiB


01  <?php
02  /**
03  *
04  * This file is part of the phpBB Forum Software package.
05  *
06  * @copyright (c) phpBB Limited <https://www.phpbb.com>
07  * @license GNU General Public License, version 2 (GPL-2.0)
08  *
09  * For full copyright and license information, please see
10  * the docs/CREDITS.txt file.
11  *
12  */
13   
14  namespace phpbb\notification\method;
15   
16  /**
17  * Email notification method class
18  * This class handles sending emails for notifications
19  */
20   
21  class email extends \phpbb\notification\method\messenger_base
22  {
23      /** @var \phpbb\user */
24      protected $user;
25   
26      /** @var \phpbb\config\config */
27      protected $config;
28   
29      /**
30       * Notification Method email Constructor
31       *
32       * @param \phpbb\user_loader $user_loader
33       * @param \phpbb\user $user
34       * @param \phpbb\config\config $config
35       * @param string $phpbb_root_path
36       * @param string $php_ext
37       */
38      public function __construct(\phpbb\user_loader $user_loader, \phpbb\user $user, \phpbb\config\config $config, $phpbb_root_path, $php_ext)
39      {
40          parent::__construct($user_loader, $phpbb_root_path, $php_ext);
41   
42          $this->user = $user;
43          $this->config = $config;
44      }
45   
46      /**
47      * Get notification method name
48      *
49      * @return string
50      */
51      public function get_type()
52      {
53          return 'notification.method.email';
54      }
55   
56      /**
57      * Is this method available for the user?
58      * This is checked on the notifications options
59      */
60      public function is_available()
61      {
62          return $this->config['email_enable'] && $this->user->data['user_email'];
63      }
64   
65      /**
66      * Parse the queue and notify the users
67      */
68      public function notify()
69      {
70          return $this->notify_using_messenger(NOTIFY_EMAIL);
71      }
72  }
73