summaryrefslogtreecommitdiffstats
path: root/src/account/aux_lu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/account/aux_lu.c')
-rw-r--r--src/account/aux_lu.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/account/aux_lu.c b/src/account/aux_lu.c
new file mode 100644
index 0000000..2907214
--- /dev/null
+++ b/src/account/aux_lu.c
@@ -0,0 +1,22 @@
+#include "aux_lu.h"
+#include <libuser/entity.h>
+#include <libuser/user.h>
+
+/*
+ * Get the value of type from the given entity
+ * returns string
+ */
+char* aux_lu_get_str(struct lu_ent* ent, char* type)
+{
+ return g_value_get_string(g_value_array_get_nth(lu_ent_get(ent, type), 0));
+}
+
+/*
+ * Get the value of type from the given entity
+ * returns long int
+ */
+long aux_lu_get_long(struct lu_ent* ent, char* type)
+{
+ return g_value_get_long(g_value_array_get_nth(lu_ent_get(ent, type), 0));
+}
+