-
Notifications
You must be signed in to change notification settings - Fork 11
/
Plugin.php
62 lines (50 loc) · 1.52 KB
/
Plugin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
namespace Kanboard\Plugin\Registration;
use Kanboard\Core\Plugin\Base;
use Kanboard\Core\Security\Role;
use Kanboard\Core\Translator;
class Plugin extends Base
{
public function initialize()
{
$this->applicationAccessMap->add('Register', '*', Role::APP_PUBLIC);
$this->route->addRoute('/signup', 'Register', 'create', 'Registration');
$this->route->addRoute('/signup/activate/:user_id/:token', 'Register', 'activate', 'Registration');
$this->template->hook->attach('template:config:application', 'Registration:config/application');
$this->template->hook->attach('template:auth:login-form:after', 'Registration:auth/login');
}
public function onStartup()
{
Translator::load($this->languageModel->getCurrentLanguage(), __DIR__.'/Locale');
}
public function getClasses()
{
return array(
'Plugin\Registration\Validator' => array('RegistrationValidator'),
);
}
public function getPluginName()
{
return 'Self-Registration';
}
public function getPluginDescription()
{
return t('Allow people to sign up themselves on Kanboard');
}
public function getPluginAuthor()
{
return 'Frédéric Guillot';
}
public function getPluginVersion()
{
return '1.0.8';
}
public function getPluginHomepage()
{
return 'https://github.com/kanboard/plugin-registration';
}
public function getCompatibleVersion()
{
return '>=1.0.37';
}
}