-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.txt
93 lines (81 loc) · 2.86 KB
/
install.txt
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
How to install:
1. Composer
------------------------------------------------------------
"require": {
"mighty-code/phalcon-user-plugin-2": "dev-master"
},
2. loader.php
------------------------------------------------------------
require_once __DIR__ . '/../../vendor/autoload.php';
3. config.php
------------------------------------------------------------
'pup' => array(
'redirect' => array(
'success' => 'user_account/edit',
'failure' => 'user/login'
),
'messages'=> array(
'not_permitted' => 'You are not permitted here...(%s/%s)',
'must_be_logged_in' => 'You have to login...'
),
'models' => array(
'user' => "MightyCodePup\Models\Users",
'userSuccessLogins' => "MightyCodePup\Models\UserSuccessLogins",
'userResetPasswords' => "MightyCodePup\Models\UserResetPasswords",
'userPasswordChanges' => "MightyCodePup\Models\UserPasswordChanges",
'userRememberTokens' => "MightyCodePup\Models\UserRememberTokens",
'userPermissions' => "MightyCodePup\Models\UserPermissions",
'userGroups' => "MightyCodePup\Models\UserGroups",
'userFailedLogins' => "MightyCodePup\Models\UserFailedLogins",
),
'registration'=> array(
'default_user_group_id' => 2,
'default_user_is_active' => 1
),
'connectors' => array(
'facebook' => array(
'appId' => 'YOUR_FACEBOOK_APP_ID',
'secret' => 'YOUR_FACEBOOK_APP_SECRET'
),
'linkedIn' => array(
'api_key' => 'YOUR_LINKED_IN_APP_ID',
'api_secret' => 'YOUR_LINKED_IN_APP_SECRET',
'callback_url' => 'CALLBACK_URL'
),
'twitter' => array(
'consumer_key' => 'TWITTER_CONSUMER_KEY',
'consumer_secret' => 'TWITTER_CONSUMER_SECRET',
'user_agent' => 'YOUR_APPLICATION_NAME', // Leave empty if you don't want to set it
),
'google' => array(
'application_name' => 'YOUR_APPLICATION_NAME',
'client_id' => 'YOUR_CLIENT_ID',
'client_secret' => 'YOUR_CLIENT_SECRET',
'developer_key' => 'YOUR_DEVELOPER_KEY',
'redirect_uri' => 'YOUR_REDIRECT_URI'
),
)
),
//optional:
'mail' => array(
'fromName' => 'PhalconUserPlugin 2 by Mighty Code',
'fromEmail' => '[email protected]',
'smtp' => array(
'server' => '',
'port' => 465,
'security' => 'ssl',
'username' => '',
'password' => ''
)
)
4. Add Models or create your own inheritating Plugins Interfaces
//show sample
5. Add Tables to your Database
schema.sql
6. Define all permissions in config/acl.php
7. Define Permissions of Groups in permissions Table
8. Add all to DI in services.php
- flash with session!
- session start
- dispatcher
- mail