File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,22 @@ public function postSignUp( SignUpRequest $request )
204204 {
205205 Hook::action ( 'ns-register-form ' , $ request );
206206
207+ /**
208+ * check user existence
209+ */
210+ $ user = User::where ( 'email ' , $ request ->input ( 'email ' ) )->first ();
211+ if ( $ user instanceof User ) {
212+ throw new NotAllowedException ( __ ( 'Unable to register using this email. ' ) );
213+ }
214+
215+ /**
216+ * check user existence
217+ */
218+ $ user = User::where ( 'username ' , $ request ->input ( 'username ' ) )->first ();
219+ if ( $ user instanceof User ) {
220+ throw new NotAllowedException ( __ ( 'Unable to register using this username. ' ) );
221+ }
222+
207223 $ options = app ()->make ( Options::class );
208224 $ role = $ options ->get ( 'ns_registration_role ' );
209225 $ registration_validated = $ options ->get ( 'ns_registration_validated ' , 'yes ' );
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ public function authorize()
3232 public function rules ()
3333 {
3434 return [
35- 'username ' => 'required|min:6|unique:nexopos_users ' ,
36- 'email ' => 'email|unique:nexopos_users ' ,
35+ 'username ' => 'required|min:6 ' ,
36+ 'email ' => 'email ' ,
3737 'password ' => 'required ' ,
3838 'password_confirm ' => 'same:password '
3939 ];
Original file line number Diff line number Diff line change 11<?php
22return [
3- 'version ' => '4.4.0 ' ,
3+ 'version ' => '4.4.1 ' ,
44 'pos ' => [
55 // deprecated
66 'payments ' => [
You can’t perform that action at this time.
0 commit comments