1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/movim_ynh.git synced 2024-09-03 19:46:19 +02:00
movim_ynh/sources/app/controllers/AdminloginController.php

23 lines
518 B
PHP
Executable file

<?php
class AdminloginController extends BaseController
{
function load()
{
$this->session_only = false;
}
function dispatch()
{
$this->page->setTitle(__('title.administration', APP_TITLE));
$cd = new \Modl\ConfigDAO();
$config = $cd->get();
if($config->username == $_POST['username']
&& $config->password == sha1($_POST['password'])) {
$_SESSION['admin'] = true;
$this->name = 'admin';
}
}
}