Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephane Crozat
apisub
Commits
7cda02e4
Commit
7cda02e4
authored
Feb 02, 2019
by
Stephane Crozat
Browse files
Empêchement de la désinscription après validation par URL
parent
11ff9861
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/db.php
View file @
7cda02e4
...
...
@@ -50,7 +50,8 @@ class DB {
}
public
function
unsubToApi
(
$utclogin
,
$api
)
{
$sql
=
'DELETE FROM subscribe WHERE utclogin=:utclogin AND api=:api'
;
/** Testing validation IS NULL prevent from unsubscribing to validated Api **/
$sql
=
'DELETE FROM subscribe WHERE utclogin=:utclogin AND api=:api AND validation IS NULL'
;
$st
=
$this
->
conn
->
prepare
(
$sql
);
$st
->
bindValue
(
':utclogin'
,
$utclogin
,
PDO
::
PARAM_STR
);
$st
->
bindValue
(
':api'
,
$api
,
PDO
::
PARAM_INT
);
...
...
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