File tree 4 files changed +51
-7
lines changed
4 files changed +51
-7
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ composer.phar
7
7
/app /database /* .sqlite
8
8
/app /storage /meta /services.json
9
9
/app /config /* /mail.php
10
+ /app /config /* /session.php
10
11
/app /config /* /database.php
11
12
/app /config /* /app.php
12
13
public /packages /*
@@ -23,9 +24,5 @@ public/uploads/logo.png
23
24
.siteflow
24
25
public /assets /.siteflow
25
26
.settings /settings.json
26
- app /config /packages /schickling /backup /config.php
27
- app /config /packages /fideloper /proxy /config.php
28
- app /storage /dumps /20150619212924.sql
29
- app /config /staging /session.php
30
- app /config /production /session.php
31
- app /config /local /session.php
27
+
28
+
Original file line number Diff line number Diff line change 137
137
138
138
'secure ' => false ,
139
139
140
+
141
+ /*
142
+ |--------------------------------------------------------------------------
143
+ | Allow multiple logins from different devices at the same time
144
+ |--------------------------------------------------------------------------
145
+ |
146
+ | By default, if a user logs into an account where someone is already
147
+ | logged in, the previous user will be logged out. We recommend leaving
148
+ | this set to false for security reasons.
149
+ |
150
+ */
151
+
152
+ 'multi_login ' => false ,
153
+
140
154
);
Original file line number Diff line number Diff line change 135
135
|
136
136
*/
137
137
138
- 'secure ' => false ,
138
+ 'secure ' => true ,
139
+
140
+
141
+ /*
142
+ |--------------------------------------------------------------------------
143
+ | Allow multiple logins from different devices at the same time
144
+ |--------------------------------------------------------------------------
145
+ |
146
+ | By default, if a user logs into an account where someone is already
147
+ | logged in, the previous user will be logged out. We recommend leaving
148
+ | this set to false for security reasons.
149
+ |
150
+ */
151
+
152
+ 'multi_login ' => true ,
139
153
140
154
);
Original file line number Diff line number Diff line change @@ -119,5 +119,24 @@ public function scopeGetNotDeleted($query)
119
119
return $ query ->whereNull ('deleted_at ' );
120
120
}
121
121
122
+ /**
123
+ * Override the SentryUser getPersistCode method for
124
+ * multiple logins at one time
125
+ **/
126
+ public function getPersistCode ()
127
+ {
128
+
129
+ if (!Config::get ('session.multi_login ' ) || (!$ this ->persist_code ))
130
+ {
131
+ $ this ->persist_code = $ this ->getRandomString ();
132
+
133
+ // Our code got hashed
134
+ $ persistCode = $ this ->persist_code ;
135
+ $ this ->save ();
136
+ return $ persistCode ;
137
+ }
138
+ return $ this ->persist_code ;
139
+ }
140
+
122
141
123
142
}
You can’t perform that action at this time.
0 commit comments