Commit bb599f4f authored by okhin's avatar okhin 🚴

Merging the change on prod done by @Mindiell

parent 33731eaf
Pipeline #2251 passed with stages
in 1 minute and 42 seconds
This diff is collapsed.
......@@ -108,7 +108,7 @@ class Campaign extends Controller
$user = $f3->get('container')['user_finder']->findByEmail(\Utils::asl($email));
if (len($user) > 0) {
if (count($user) > 0) {
// 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');
......@@ -117,6 +117,9 @@ class Campaign extends Controller
if (!$login) {
$f3->error(403);
}
$email = $user['email'];
$user_id = $user['id'];
$cumul_id = $user['cumul'];
} else {
// The user does not exist, so let's create it
$result = $db->query("INSERT INTO users (pseudo, email, hash)
......
......@@ -5,15 +5,7 @@
<check if="{{@error}}"><p class="error">{{@error | raw}}</p></check>
<check if="{{@message}}"><p class="message">{{@message | raw}}</p></check>
<section>
<ul>
<li class="clickable" onclick="show_hide('cbs', ['verif', 'update']);">Dates d'expiration des CB</li>
<li class="clickable" onclick="show_hide('verif', ['cbs', 'update']);">Vérification des dons</li>
<li class="clickable" onclick="show_hide('update', ['verif', 'cbs']);">Mise à jour des dons</li>
</ul>
</section>
<section id="cbs" class="{{@class_cbs}}">
<section id="cbs">
<h3 >Mise à jour des dates d'expiration des CB</h3>
<form enctype="multipart/form-data" name="f" method="POST" action="{{ 'banque' | alias }}">
<input type="hidden" id="csrf" name="csrf" value="{{ @CSRF }}" />
......@@ -24,7 +16,7 @@
</form>
</section>
<section id="verif" class="{{@class_verif}}">
<section id="verif">
<h3>Vérification des dons</h3>
<form enctype="multipart/form-data" name="f" method="POST" action="{{ 'banque' | alias }}">
<input type="hidden" id="csrf" name="csrf" value="{{ @CSRF }}" />
......@@ -35,7 +27,7 @@
</form>
</section>
<section id="update" class="{{@class_update}}">
<section id="update">
<h3>Mise à jour des dons</h3>
<form enctype="multipart/form-data" name="f" method="POST" action="{{ 'banque' | alias }}">
<input type="hidden" id="csrf" name="csrf" value="{{ @CSRF }}" />
......
<include href="backend/header.html" />
<include href="backend/toolbar.html" />
<include href="{{ @block_content }}" />
<!-- <include href="backend/footer.html" /> <!-- No need for scripts right now -->
<!-- <include href="backend/footer.html" /> -->
......@@ -31,8 +31,15 @@
<option value="4,101" <check if="{{ @status=='4,101' }}">selected</check> >Récurrent validé</option>
</select>
<label for="date1">Depuis le</label>
<input type="date" id="date1" name="date1" value="{{ @date1 }}" />
<label for="date2">Jusqu'au</label>
<input type="date" id="date2" name="date2" value="{{ @date2 }}" />
<label for="limite">Limite</label>
<input type="text" id="limite" name="limite" size="3" value="{{ @limite }}" />
<label for="page">Page</label>
<input type="text" id="page" name="page" size="3" value="{{ @page }}" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment