From: dj3c1t Date: Mon, 23 Dec 2013 18:35:09 +0000 (+0100) Subject: identification install sur table users X-Git-Tag: mtweb.0.13.0~1 X-Git-Url: http://git.dj3c1t.com/index.cgi?a=commitdiff_plain;h=8725705c494dadc483390e73b38a83ae46ac5700;p=mtweb identification install sur table users --- diff --git a/mw/app/controllers/install/index.php b/mw/app/controllers/install/index.php index 94e146b..07fb56e 100644 --- a/mw/app/controllers/install/index.php +++ b/mw/app/controllers/install/index.php @@ -128,10 +128,6 @@ $env->erreur("la base de données a été installée mais impossible d'ajouter l'administrateur"); return; } - if(!$env->set_webmaster_user($admin["login"], md5($admin["password"]))){ - $env->erreur("la base de données a été installée mais impossible d'enregistrer le webmaster"); - return; - } } if(!$env->messages()){ if(!$content = @file_get_contents($template_file)){ diff --git a/mw/app/controllers/upgrade/index.php b/mw/app/controllers/upgrade/index.php index 7b0752d..83d0b6c 100644 --- a/mw/app/controllers/upgrade/index.php +++ b/mw/app/controllers/upgrade/index.php @@ -2,12 +2,6 @@ class mw_upgrade_index extends mw_controller{ - function validate(){ - $env = $this->env(); - $env->load_webmaster_session(); - return true; - } - function index(){ $env = $this->env(); $data = $env->data(); @@ -22,17 +16,6 @@ $env->redirect($env->url("upgrade"), "", 0); return; } - if(!($webmaster_user = $env->get_webmaster_user())){ - $env->erreur("impossible de lire le user webmaster"); - return; - } - if( - ($user["login"] != $webmaster_user["login"]) - || ($user["password"] != $webmaster_user["password"]) - ){ - $env->erreur("identification incorrecte"); - return; - } if(($res = $env->do_data_upgrade()) !== true){ $env->erreur("Erreur durant l'upgrade: ".$res); return; diff --git a/mw/app/controllers/upgrade/user.php b/mw/app/controllers/upgrade/user.php index 68dce71..9e9485e 100644 --- a/mw/app/controllers/upgrade/user.php +++ b/mw/app/controllers/upgrade/user.php @@ -2,18 +2,12 @@ class mw_upgrade_user extends mw_controller{ - function validate(){ - $env = $this->env(); - $env->load_webmaster_session(); - return true; - } - function login(){ $env = $this->env(); if($_POST){ $data = $env->data(); $message = "Identifiants incorrects"; - if($user = $env->webmaster_login(trim($_POST['login']), trim($_POST['pass']))){ + if($user = $data->login(trim($_POST['login']), trim($_POST['pass']))){ $message = "Vous êtes maintenant identifié en tant que ".$user['login']; } $env->redirect( diff --git a/mw/app/out/default/views/upgrade/head.php b/mw/app/out/default/views/upgrade/head.php index 0f9cce0..b5647bb 100644 --- a/mw/app/out/default/views/upgrade/head.php +++ b/mw/app/out/default/views/upgrade/head.php @@ -8,6 +8,7 @@ + js_files() as $js_file) : ?> diff --git a/mw/app/out/default/views/upgrade/index.php b/mw/app/out/default/views/upgrade/index.php index 296778a..802ae94 100644 --- a/mw/app/out/default/views/upgrade/index.php +++ b/mw/app/out/default/views/upgrade/index.php @@ -29,9 +29,6 @@ method="post">
Identification -

- Identifiez-vous avec l'utilisateur que vous avez créé pendant l'installation du site. -