Commit 86fb3383 authored by Clarissa's avatar Clarissa

atualizar funcionario arrumado, nome da database arrumado no config

parent 8c10793d
......@@ -2,8 +2,8 @@
return array(
'db' => array(
'host' => 'localhost',
'dbname' => 'ru',
'dbname' => 'RU',
'login' => 'root',
'password'=>'P@$71lh@$'
)
);
\ No newline at end of file
);
......@@ -66,10 +66,14 @@ class FuncionarioController extends Controller{
if (!empty($result)){
$func = $result[0];
if(!empty($_POST)){
$senha = $func->getSenha();
$hydrator = new Hydrator();
$hydrator->hydrate($_POST, $func);
if ($this->validaSenha($func->getSenha(), trim($_POST['confirmasenha']))){
try{
$senha2 = $func->getSenha();
if (empty($senha2))
$func->setSenha($senha);
$result = $FuncionarioDao->atualizar($func, array('id' => $func->getId()));
}catch(\Exception $ex){
$viewData['success'] = false;
......
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