Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcarfixers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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
Tobin
dcarfixers
Commits
6e7ad87c
Commit
6e7ad87c
authored
6 years ago
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
authtoken webservice
parent
0c8bcff2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
Webservice_model.php
application/models/Webservice_model.php
+3
-1
No files found.
application/models/Webservice_model.php
View file @
6e7ad87c
...
@@ -51,9 +51,11 @@ class Webservice_model extends CI_Model {
...
@@ -51,9 +51,11 @@ class Webservice_model extends CI_Model {
$static_string
=
time
();
$static_string
=
time
();
$authToken
=
'Dcarfixs'
.
sha1
(
$static_string
);
$authToken
=
'Dcarfixs'
.
sha1
(
$static_string
);
$custData
=
$this
->
db
->
get_where
(
'authtable'
,
array
(
'customer_id'
=>
$id
));
$custData
=
$this
->
db
->
get_where
(
'authtable'
,
array
(
'customer_id'
=>
$id
));
if
(
!
empty
(
$custData
)
&&
$custData
->
num_rows
()
>
0
&&
$custData
=
$custData
->
row
()
){
if
(
empty
(
$custData
)
&&
$custData
->
num_rows
()
<
0
){
$this
->
db
->
insert
(
'authtable'
,
array
(
'customer_id'
=>
$id
,
'authtoken'
=>
$authToken
));
$this
->
db
->
insert
(
'authtable'
,
array
(
'customer_id'
=>
$id
,
'authtoken'
=>
$authToken
));
}
else
{
}
else
{
$custData
=
$custData
->
row
();
//print_r($custData);exit();
$authToken
=
$custData
->
authtoken
;
$authToken
=
$custData
->
authtoken
;
}
}
...
...
This diff is collapsed.
Click to expand it.
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