]> saetta.ns0.it Git - zakauthe/plugins/smbldap/commitdiff
Started user management.
authorAndrea Zagli <azagli@libero.it>
Sun, 5 Sep 2010 13:33:25 +0000 (15:33 +0200)
committerAndrea Zagli <azagli@libero.it>
Sun, 5 Sep 2010 13:33:25 +0000 (15:33 +0200)
configure.ac
data/libaute-smbldap/Makefile.am
data/libaute-smbldap/form/Makefile.am [deleted file]
data/libaute-smbldap/form/user.form [deleted file]
data/libaute-smbldap/gui/autesmbldap.gui
src/Makefile.am
src/aute_smbldap.c
src/user.c
src/user.h

index a8fcd4aab160c2383a86fd180af757464bdb33e2..b2ed1ffaf5c953a62d13e7beb9ba8d6f461f4f32 100644 (file)
@@ -19,8 +19,7 @@ AC_PROG_LIBTOOL
 
 # Checks for libraries.
 PKG_CHECK_MODULES(LIBAUTESMBLDAP, [gtk+-2.0 >= 2.16.0
-                              libaute >= 0.1.0
-                              libgtkform >= 0.1.4])
+                              libaute >= 0.1.0])
 
 AC_SUBST(LIBAUTESMBLDAP_CFLAGS)
 AC_SUBST(LIBAUTESMBLDAP_LIBS)
@@ -65,7 +64,6 @@ AC_CONFIG_FILES([
   src/Makefile
   data/Makefile
   data/libaute-smbldap/Makefile
-  data/libaute-smbldap/form/Makefile
   data/libaute-smbldap/gui/Makefile
   doc/Makefile
   doc/libaute-smbldap/Makefile
index 45a80458ea8c6627d20c4234046721b8a710307f..13c2b3d2c8f434b8f71be870bd41963d9d7b4c75 100644 (file)
@@ -1 +1 @@
-SUBDIRS = gui form
+SUBDIRS = gui
diff --git a/data/libaute-smbldap/form/Makefile.am b/data/libaute-smbldap/form/Makefile.am
deleted file mode 100644 (file)
index 113eb1a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-formdir = $(datadir)/libaute-smbldap/form
-
-form_DATA = user.form
-
-EXTRA_DIST = $(form_DATA)
diff --git a/data/libaute-smbldap/form/user.form b/data/libaute-smbldap/form/user.form
deleted file mode 100644 (file)
index 3c8a122..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0"?>
-<gtkform>
-
-       <table>users</table>
-
-       <widget type="entry" name="entry1" label="label6">
-               <field type="text" name="code">
-                       <is-key>t</is-key>
-                       <obligatory>t</obligatory>
-               </field>
-       </widget>
-
-       <widget type="label" name="label14">
-               <field type="text" name="password">
-               </field>
-       </widget>
-
-       <widget type="entry" name="entry2" label="label7">
-               <field type="text" name="surname">
-                       <obligatory>t</obligatory>
-               </field>
-       </widget>
-
-       <widget type="entry" name="entry3" label="label8">
-               <field type="text" name="name" />
-       </widget>
-
-       <widget type="checkbox" name="checkbutton1" label="label9">
-               <field type="boolean" name="enabled">
-                       <default>t</default>
-               </field>
-       </widget>
-
-       <widget type="entry" name="entry4" label="label11">
-               <field type="datetime" name="password_expiration">
-                       <datetime-type>datetime</datetime-type>
-                       <display-format>%d/%m/%Y %H.%M.%S</display-format>
-               </field>
-       </widget>
-
-       <widget type="textview" name="textview1" label="label12">
-               <field type="text" name="notes" />
-       </widget>
-
-</gtkform>
index d00327884c5e31042f6a76488341d2c0b873a6b0..399d0cba1cbbc24fd231c1d09e21c468b6a97189 100644 (file)
                 <property name="label" translatable="yes">Surname</property>
               </object>
               <packing>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
                 <property name="x_options">GTK_FILL</property>
                 <property name="y_options">GTK_FILL</property>
               </packing>
                 <property name="label" translatable="yes">Name</property>
               </object>
               <packing>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
+                <property name="top_attach">3</property>
+                <property name="bottom_attach">4</property>
                 <property name="x_options">GTK_FILL</property>
                 <property name="y_options">GTK_FILL</property>
               </packing>
                 <property name="label" translatable="yes">Enabled</property>
               </object>
               <packing>
-                <property name="top_attach">3</property>
-                <property name="bottom_attach">4</property>
+                <property name="top_attach">4</property>
+                <property name="bottom_attach">5</property>
                 <property name="x_options">GTK_FILL</property>
                 <property name="y_options">GTK_FILL</property>
               </packing>
                 <property name="label" translatable="yes">Password expiration</property>
               </object>
               <packing>
-                <property name="top_attach">4</property>
-                <property name="bottom_attach">5</property>
+                <property name="top_attach">5</property>
+                <property name="bottom_attach">6</property>
                 <property name="x_options">GTK_FILL</property>
                 <property name="y_options">GTK_FILL</property>
               </packing>
                 <property name="label" translatable="yes">Description</property>
               </object>
               <packing>
-                <property name="top_attach">5</property>
-                <property name="bottom_attach">6</property>
+                <property name="top_attach">6</property>
+                <property name="bottom_attach">7</property>
                 <property name="x_options">GTK_FILL</property>
                 <property name="y_options">GTK_FILL</property>
               </packing>
               <packing>
                 <property name="left_attach">1</property>
                 <property name="right_attach">2</property>
-                <property name="top_attach">3</property>
-                <property name="bottom_attach">4</property>
+                <property name="top_attach">4</property>
+                <property name="bottom_attach">5</property>
                 <property name="y_options">GTK_FILL</property>
               </packing>
             </child>
               <packing>
                 <property name="left_attach">1</property>
                 <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
                 <property name="y_options">GTK_FILL</property>
               </packing>
             </child>
               <packing>
                 <property name="left_attach">1</property>
                 <property name="right_attach">2</property>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
+                <property name="top_attach">3</property>
+                <property name="bottom_attach">4</property>
                 <property name="y_options">GTK_FILL</property>
               </packing>
             </child>
               <packing>
                 <property name="left_attach">1</property>
                 <property name="right_attach">2</property>
-                <property name="top_attach">4</property>
-                <property name="bottom_attach">5</property>
+                <property name="top_attach">5</property>
+                <property name="bottom_attach">6</property>
                 <property name="y_options">GTK_FILL</property>
               </packing>
             </child>
               <packing>
                 <property name="left_attach">1</property>
                 <property name="right_attach">2</property>
-                <property name="top_attach">5</property>
-                <property name="bottom_attach">6</property>
+                <property name="top_attach">6</property>
+                <property name="bottom_attach">7</property>
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="label14">
-                <property name="label" translatable="yes">lbl_password</property>
+              <object class="GtkLabel" id="label16">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">UID</property>
               </object>
               <packing>
-                <property name="top_attach">6</property>
-                <property name="bottom_attach">7</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
                 <property name="x_options">GTK_FILL</property>
                 <property name="y_options">GTK_FILL</property>
               </packing>
             </child>
             <child>
-              <placeholder/>
+              <object class="GtkLabel" id="label19">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">lbl_uid</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
             </child>
           </object>
           <packing>
index 241e48152f3ff2789e53451fdf4eb7d34cbc83c1..833be51fc5098f7f9afcf2e407bd3f95551021e6 100644 (file)
@@ -1,12 +1,10 @@
 guidir = $(datadir)/libaute-smbldap/gui
-formdir = $(datadir)/libaute-smbldap/form
 
 AM_CPPFLAGS = $(LIBAUTESMBLDAP_CFLAGS) \
               $(LIBLDAP_CFLAGS) \
               $(LIBSSH_CFLAGS) \
               $(LIBCONFI_CFLAGS) \
-              -DGUIDIR=\""$(guidir)"\" \
-              -DFORMDIR=\""$(formdir)"\"
+              -DGUIDIR=\""$(guidir)"\"
 
 LIBS = $(LIBAUTESMBLDAP_LIBS) \
        $(LIBLDAP_LIBS) \
index 5429cb148d754e197f13dc4ee6518dd4dc0975a8..3d71b000606d1483fb2eda0f7878ca9b7671d2bc 100644 (file)
@@ -679,12 +679,12 @@ autesmbldap_edit_user ()
 
                        if (gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)) == 0)
                                {
-                                       /*User *u = user_new (gtkbuilder, gdaex, guifile, formdir, NULL);
+                                       User *u = user_new (gtkbuilder, guifile, ldap, cn, users_ou, base_dn);
 
                                        g_signal_connect (G_OBJECT (u), "aggiornato",
                                                                          G_CALLBACK (autesmbldap_on_user_aggiornato), NULL);
 
-                                       w = user_get_widget (u);*/
+                                       w = user_get_widget (u);
                                }
                        else if (gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)) == 1)
                                {
@@ -729,12 +729,12 @@ autesmbldap_on_btn_new_clicked (GtkButton *button,
 
        if (gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)) == 0)
                {
-                       /*User *u = user_new (gtkbuilder, gdaex, guifile, formdir, NULL);
+                       User *u = user_new (gtkbuilder, guifile, ldap, "", users_ou, base_dn);
 
                        g_signal_connect (G_OBJECT (u), "aggiornato",
                                                  G_CALLBACK (autesmbldap_on_user_aggiornato), NULL);
 
-                       w = user_get_widget (u);*/
+                       w = user_get_widget (u);
                }
        else if (gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)) == 1)
                {
index 12e1648d1202bb47489a901d80d11a7ed89a424d..f00ba5c4b722277f978f188c6cb41366561dbd23 100644 (file)
@@ -17,8 +17,6 @@
  *
  */
 
-#include <libgtkform/form.h>
-
 #include "user.h"
 #include "aute_smbldap.h"
 
@@ -28,8 +26,6 @@ static void user_init (User *user);
 static void user_carica (User *user);
 static void user_salva (User *user);
 
-static gboolean user_conferma_chiusura (User *user);
-
 static void user_set_property (GObject *object,
                                      guint property_id,
                                      const GValue *value,
@@ -39,10 +35,6 @@ static void user_get_property (GObject *object,
                                      GValue *value,
                                      GParamSpec *pspec);
 
-static gboolean user_on_w_user_delete_event (GtkWidget *widget,
-                               GdkEvent *event,
-                               gpointer user_data);
-
 static void user_on_btn_annulla_clicked (GtkButton *button,
                                     gpointer user_data);
 static void user_on_btn_salva_clicked (GtkButton *button,
@@ -50,27 +42,25 @@ static void user_on_btn_salva_clicked (GtkButton *button,
 
 #define USER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_USER, UserPrivate))
 
-enum
-{
-       TXT_CODE,
-       LBL_PASSWORD
-};
-
 typedef struct _UserPrivate UserPrivate;
 struct _UserPrivate
        {
                GtkBuilder *gtkbuilder;
-               GdaEx *gdaex;
                gchar *guifile;
-               gchar *formdir;
-
-               GtkForm *form;
+               LDAP *ldap;
 
                GtkWidget *w;
 
-               GObject **objects;
+               GtkWidget *txt_cn;
+               GtkWidget *lbl_uid;
+               GtkWidget *txt_surname;
+               GtkWidget *txt_name;
+               GtkWidget *chk_enabled;
+               GtkWidget *txtv_description;
 
-               gchar *code;
+               gchar *cn;
+               gchar *users_ou;
+               gchar *base_dn;
        };
 
 G_DEFINE_TYPE (User, user, G_TYPE_OBJECT)
@@ -106,33 +96,37 @@ user_init (User *user)
 {
        UserPrivate *priv = USER_GET_PRIVATE (user);
 
-       priv->code = NULL;
+       priv->cn = NULL;
+       priv->users_ou = NULL;
+       priv->base_dn = NULL;
 }
 
 /**
  * user_new:
  * @gtkbuilder:
- * @gdaex:
  * @guifile:
- * @formdir:
- * @code:
+ * @ldap:
+ * @cn:
+ * @users_ou:
+ * @base_dn:
  *
  * Returns: the newly created #User object.
  */
 User
-*user_new (GtkBuilder *gtkbuilder, GdaEx *gdaex,
-           const gchar *guifile, const gchar *formdir, const gchar *code)
+*user_new (GtkBuilder *gtkbuilder, const gchar *guifile, LDAP *ldap,
+            const gchar *cn, const gchar *users_ou, const gchar *base_dn)
 {
        GError *error;
 
+       g_return_val_if_fail (cn != NULL && users_ou != NULL && base_dn != NULL, NULL);
+
        User *a = USER (g_object_new (user_get_type (), NULL));
 
        UserPrivate *priv = USER_GET_PRIVATE (a);
 
        priv->gtkbuilder = gtkbuilder;
-       priv->gdaex = gdaex;
        priv->guifile = g_strdup (guifile);
-       priv->formdir = g_strdup (formdir);
+       priv->ldap = ldap;
 
        error = NULL;
        gtk_builder_add_objects_from_file (priv->gtkbuilder, priv->guifile,
@@ -144,40 +138,27 @@ User
                        return NULL;
                }
 
-       priv->form = gtk_form_new ();
-       g_object_set (priv->form, "gdaex", priv->gdaex, NULL);
-       gtk_form_load_from_file (priv->form, g_build_filename (priv->formdir, "user.form", NULL), priv->gtkbuilder);
-
-       g_object_set (priv->form, "gdaex", priv->gdaex, NULL);
-
        priv->w = GTK_WIDGET (gtk_builder_get_object (priv->gtkbuilder, "w_user"));
-
-       priv->objects = gtk_form_get_objects_by_name (priv->form,
-                                                     "entry1",
-                                                     "label14",
-                                                     NULL);
-
-       g_signal_connect (priv->w,
-                         "delete-event", G_CALLBACK (user_on_w_user_delete_event), (gpointer *)a);
+       priv->txt_cn = GTK_WIDGET (gtk_builder_get_object (priv->gtkbuilder, "entry1"));
+       priv->lbl_uid = GTK_WIDGET (gtk_builder_get_object (priv->gtkbuilder, "label19"));
+       priv->txt_surname = GTK_WIDGET (gtk_builder_get_object (priv->gtkbuilder, "entry2"));
+       priv->txt_name = GTK_WIDGET (gtk_builder_get_object (priv->gtkbuilder, "entry3"));
+       priv->chk_enabled = GTK_WIDGET (gtk_builder_get_object (priv->gtkbuilder, "checkbutton1"));
+       priv->txtv_description = GTK_WIDGET (gtk_builder_get_object (priv->gtkbuilder, "textview1"));
 
        g_signal_connect (gtk_builder_get_object (priv->gtkbuilder, "button5"),
                          "clicked", G_CALLBACK (user_on_btn_annulla_clicked), (gpointer *)a);
        g_signal_connect (gtk_builder_get_object (priv->gtkbuilder, "button6"),
                          "clicked", G_CALLBACK (user_on_btn_salva_clicked), (gpointer *)a);
 
-       if (code != NULL)
-               {
-                       priv->code = g_strstrip (g_strdup (code));
-               }
-       if (priv->code == NULL || g_strcmp0 (priv->code, "") == 0)
-               {
-                       gtk_form_clear (priv->form);
-               }
-       else
-               {
-                       gtk_entry_set_text (GTK_ENTRY (priv->objects[TXT_CODE]), priv->code);
-                       gtk_editable_set_editable (GTK_EDITABLE (priv->objects[TXT_CODE]), FALSE);
+       priv->cn = g_strstrip (g_strdup (cn));
+       priv->users_ou = g_strstrip (g_strdup (users_ou));
+       priv->base_dn = g_strstrip (g_strdup (base_dn));
 
+       gtk_entry_set_text (GTK_ENTRY (priv->txt_cn), "");
+       gtk_label_set_text (GTK_LABEL (priv->lbl_uid), "");
+       if (g_strcmp0 (priv->cn, "") != 0)
+               {
                        user_carica (a);
                }
 
@@ -203,45 +184,90 @@ user_carica (User *user)
 {
        UserPrivate *priv = USER_GET_PRIVATE (user);
 
-       if (gtk_form_fill_from_table (priv->form))
+       int retldap;
+       LDAPMessage *result;
+       LDAPMessage *entry;
+       gchar **attrs;
+       gchar *base;
+
+       BerElement *ber;
+       gchar *attr;
+       struct berval **vals;
+
+       attrs = g_strsplit ("cn|uidNumber", "|", -1);
+
+       result = NULL;
+       base = g_strdup_printf ("%s,%s", priv->users_ou, priv->base_dn);
+       retldap = ldap_search_ext_s (priv->ldap, base, LDAP_SCOPE_ONELEVEL,
+                                    g_strdup_printf ("(cn=%s)", priv->cn), attrs, 0, NULL, NULL, LDAP_NO_LIMIT,
+                                    LDAP_NO_LIMIT, &result);
+       if (retldap != LDAP_SUCCESS)
                {
+                       g_warning ("Errore nel search: %s", ldap_err2string (retldap));
+                       return;
+               }
+
+       entry = ldap_first_entry (priv->ldap, result);
+       if (entry != NULL)
+               {
+                       for (attr = ldap_first_attribute (priv->ldap, entry, &ber);
+                            attr != NULL; attr = ldap_next_attribute (priv->ldap, entry, ber))
+                               {
+                                       vals = ldap_get_values_len (priv->ldap, entry, attr);
+                                       if (vals != NULL)
+                                               {
+                                                       if (vals[0] != NULL)
+                                                               {
+                                                                       if (g_strcmp0 (attr, "cn") == 0)
+                                                                               {
+                                                                                       gtk_entry_set_text (GTK_ENTRY (priv->txt_cn), vals[0]->bv_val);
+                                                                               }
+                                                                       else if (g_strcmp0 (attr, "uidNumber") == 0)
+                                                                               {
+                                                                                       gtk_label_set_text (GTK_LABEL (priv->lbl_uid), vals[0]->bv_val);
+                                                                               }
+                                                               }
+                                                       ldap_value_free_len (vals);
+                                               }
+                                       ldap_memfree (attr);
+                               }
+                       if (ber != NULL)
+                               {
+                                       ber_free (ber, 0);
+                               }
+               }
+       else
+               {
+                       g_warning ("User «%s» not found.", g_strdup_printf ("cn=%s,%s", base, priv->cn));
                }
 }
 
 static void
 user_salva (User *user)
 {
-       GError *error = NULL;
-       gchar *sql;
        GtkWidget *dialog;
 
-       GDate *da;
-       GDate *a;
-
        UserClass *klass = USER_GET_CLASS (user);
 
        UserPrivate *priv = USER_GET_PRIVATE (user);
 
-       if (!gtk_form_check (priv->form, FALSE, NULL, TRUE, priv->w, TRUE))
-               {
-                       return;
-               }
-
-       if (priv->code == NULL || g_strcmp0 (priv->code, "") == 0)
+       if (g_strcmp0 (priv->cn, "") == 0)
                {
-                       sql = gtk_form_get_sql (priv->form, GTK_FORM_SQL_INSERT);
+                       /*autesmbldap_exec_ssh_command (g_strdup_printf ("sudo /usr/sbin/smbldap-useradd -a -G \"Domain Users\" -N \"$nome\" -S \"$cognome\" \"$username\" \"%s\"",
+                                                 gtk_entry_get_text (GTK_ENTRY (priv->txt_cn))));
+                       priv->cn = g_strdup (gtk_entry_get_text (GTK_ENTRY (priv->txt_cn)));
+                       user_carica (user);*/
                }
        else
                {
-                       sql = gtk_form_get_sql (priv->form, GTK_FORM_SQL_UPDATE);
+                       /*autesmbldap_exec_ssh_command (g_strdup_printf ("sudo /usr/sbin/smbldap-usermod -n \"%s\" \"%s\"",
+                                                 gtk_entry_get_text (GTK_ENTRY (priv->txt_cn)), priv->cn));*/
                }
 
-       if (gdaex_execute (priv->gdaex, sql) == 1)
-               {
+       /*if (gdaex_execute (priv->gdaex, sql) == 1)
+               {*/
                        g_signal_emit (user, klass->aggiornato_signal_id, 0);
 
-                       gtk_form_set_as_origin (priv->form);
-
                        dialog = gtk_message_dialog_new (GTK_WINDOW (priv->w),
                                                                                         GTK_DIALOG_DESTROY_WITH_PARENT,
                                                                                         GTK_MESSAGE_INFO,
@@ -249,7 +275,7 @@ user_salva (User *user)
                                                                                         "Salvataggio eseguito con successo.");
                        gtk_dialog_run (GTK_DIALOG (dialog));
                        gtk_widget_destroy (dialog);
-               }
+               /*}
        else
                {
                        dialog = gtk_message_dialog_new (GTK_WINDOW (priv->w),
@@ -259,7 +285,7 @@ user_salva (User *user)
                                                                                         "Errore durante il salvataggio.");
                        gtk_dialog_run (GTK_DIALOG (dialog));
                        gtk_widget_destroy (dialog);
-               }
+               }*/
 }
 
 static void
@@ -292,42 +318,7 @@ user_get_property (GObject *object, guint property_id, GValue *value, GParamSpec
                }
 }
 
-static gboolean
-user_conferma_chiusura (User *user)
-{
-       GtkWidget *dialog;
-
-       gboolean ret;
-
-       UserPrivate *priv = USER_GET_PRIVATE (user);
-
-       ret = TRUE;
-       if (gtk_form_is_changed (priv->form))
-               {
-                       dialog = gtk_message_dialog_new (GTK_WINDOW (priv->w),
-                                                                GTK_DIALOG_DESTROY_WITH_PARENT,
-                                                                GTK_MESSAGE_QUESTION,
-                                                                GTK_BUTTONS_YES_NO,
-                                                                "Sicuro di voler chiudere senza salvare?");
-                       if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_NO)
-                               {
-                                       ret = FALSE;
-                               }
-                       gtk_widget_destroy (dialog);
-               }
-
-       return ret;
-}
-
 /* CALLBACK */
-static gboolean
-user_on_w_user_delete_event (GtkWidget *widget,
-                               GdkEvent *event,
-                               gpointer user_data)
-{
-       return !user_conferma_chiusura ((User *)user_data);
-}
-
 static void
 user_on_btn_annulla_clicked (GtkButton *button,
                         gpointer user_data)
@@ -336,7 +327,7 @@ user_on_btn_annulla_clicked (GtkButton *button,
 
        UserPrivate *priv = USER_GET_PRIVATE (user);
 
-       if (user_conferma_chiusura (user)) gtk_widget_destroy (priv->w);
+       gtk_widget_destroy (priv->w);
 }
 
 static void
index 63e0d06eaafe7a01283b2585601e8fa18885676c..2a3ad75742fd4323c7e737b8a153b05b5b6b3871 100644 (file)
@@ -24,7 +24,7 @@
 #include <glib-object.h>
 
 #include <gtk/gtk.h>
-#include <libgdaex.h>
+#include <ldap.h>
 
 G_BEGIN_DECLS
 
@@ -54,8 +54,9 @@ struct _UserClass
 
 GType user_get_type (void) G_GNUC_CONST;
 
-User *user_new (GtkBuilder *gtkbuilder, GdaEx *gdaex,
-                const gchar *guifile, const gchar *formdir, const gchar *code);
+User *user_new (GtkBuilder *gtkbuilder, const gchar *guifile,
+                  LDAP *ldap,
+                  const gchar *cn, const gchar *users_ou, const gchar *base_dn);
 
 GtkWidget *user_get_widget (User *user);