Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
don
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
17
Issues
17
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LQdN interne
don
Commits
174ebf57
Commit
174ebf57
authored
Nov 20, 2018
by
okhin
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CHeck if is array
parent
48fd5420
Pipeline
#2265
passed with stages
in 12 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
app/controller/campaign.php
app/controller/campaign.php
+2
-2
app/view/campaign/errors.html
app/view/campaign/errors.html
+2
-0
No files found.
app/controller/campaign.php
View file @
174ebf57
...
...
@@ -108,14 +108,14 @@ class Campaign extends Controller
$user
=
$f3
->
get
(
'container'
)[
'user_finder'
]
->
findByEmail
(
\Utils
::
asl
(
$email
));
if
(
count
(
$user
)
>
0
)
{
if
(
count
(
$user
)
>
0
&&
is_array
(
$user
)
)
{
// We have an existing user, we should try to login with the provided password
// or 403.
$mapper
=
new
\DB\SQL\Mapper
(
$f3
->
get
(
'DB'
),
'users'
);
$auth
=
new
\Auth
(
$mapper
,
array
(
'id'
=>
'email'
,
'pw'
=>
'hash'
));
$login
=
$auth
->
login
(
$email
,
$hash
);
if
(
!
$login
)
{
$f3
->
error
(
40
3
);
$f3
->
error
(
40
0
,
"count(user): "
.
count
(
$user
)
.
"user:
$user
, email:
$email
, pass:
$hash
"
);
}
$email
=
$user
[
'email'
];
$user_id
=
$user
[
'id'
];
...
...
app/view/campaign/errors.html
View file @
174ebf57
...
...
@@ -2,12 +2,14 @@
<div
class=
"row"
>
<div
class=
"col-md-10 col-md-offset-1 header"
>
<h2><span>
{{ @ERROR.code }} - {{ @ERROR.status }}
</span></h2>
<span>
{{ @@emsg }}
</span>
<hr>
</div>
</div>
<div
class=
"row"
>
<check
if=
"{{ @ERROR.code == 403 }}"
>
<div
class=
"col-md-5 col-md-offset-1 well light-blue"
>
<h2><span>
{{ @ERROR.code }} - {{ @ERROR.status }}
</span></h2>
{{ _("Accès refusé.
<br>
Votre mot de passe est invalide.") }}
</div>
<div
class=
"col-md-5 well sky-blue"
>
...
...
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