Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TimeOutAdmin
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TimeOut
TimeOutAdmin
Commits
b1b7e45c
You need to sign in or sign up before continuing.
Commit
b1b7e45c
authored
Nov 12, 2019
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
t : organizer username and email id conflict : uat
parent
f9aec082
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
Organizer_model.php
application/models/Organizer_model.php
+3
-12
No files found.
application/models/Organizer_model.php
View file @
b1b7e45c
...
...
@@ -416,18 +416,9 @@ class Organizer_model extends CI_Model {
try
{
$userNameChk
=
$this
->
db
->
query
(
"SELECT * FROM users
WHERE user_type='2' AND status!='2' AND
username='"
.
$data
[
'
username
'
]
.
"'"
);
username='"
.
$data
[
'
email_id
'
]
.
"'"
);
if
(
!
empty
(
$userNameChk
)
&&
$userNameChk
->
num_rows
()
>
0
){
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Username Already Exist'
,
'code'
=>
'ER07'
);
return
$res
;
}
$emailChk
=
$this
->
db
->
query
(
"SELECT * FROM provider AS PRV
INNER JOIN users AS USR ON (USR.id=PRV.provider_id)
WHERE USR.user_type='2' AND USR.status!='2' AND
PRV.email='"
.
$data
[
'email_id'
]
.
"'"
);
if
(
!
empty
(
$emailChk
)
&&
$emailChk
->
num_rows
()
>
0
){
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Email Id Already Exist'
,
'code'
=>
'ER08'
);
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Email ID Already Exist'
,
'code'
=>
'ER07'
);
return
$res
;
}
...
...
@@ -440,7 +431,7 @@ class Organizer_model extends CI_Model {
return
$res
;
}
$this
->
db
->
insert
(
'users'
,
array
(
'username'
=>
$data
[
'
username
'
],
'display_name'
=>
$data
[
'username'
],
$this
->
db
->
insert
(
'users'
,
array
(
'username'
=>
$data
[
'
email_id
'
],
'display_name'
=>
$data
[
'username'
],
'password'
=>
md5
(
$data
[
'password'
]),
'user_type'
=>
'2'
,
'status'
=>
'3'
));
$last_id
=
$this
->
db
->
insert_id
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment