public function isUserAllowedProduccition($production_id) { $table = $this->getTable(); $select = $table->select(Zend_Db_Table::SELECT_WITH_FROM_PART)->setIntegrityCheck(false); $select->where('permission_production.acl_users_id = ' . $_SESSION["gpms"]["storage"]->id)->where('permission_production.productions_id = ' . $production_id); $data = $table->fetchAll($select)->toArray(); $model = new User_Model_Roles(); $role_name = $model->fetchName($data["0"]["acl_roles_id"]); // Zend_Debug::dump($role_name); // die(); //Zend_Debug::dump( $_SESSION['gpms'],"antes de cambiar el role"); // die(); if ($data) { $this->gpms = new Zend_Session_Namespace('gpms'); $this->gpms->storage->out_production = 0; $this->gpms->storage->role_id = $data["0"]["acl_roles_id"]; $this->gpms->role = $role_name; // $_SESSION['gpms']['storage']->role_id=$data->acl_roles_id; // Zend_Debug::dump( $_SESSION['gpms'],"despues de cambiar el role"); // die("traga"); return true; } //die("no traga"); return false; }