summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-apps/indefero/files/bootstrap.php')
-rw-r--r--www-apps/indefero/files/bootstrap.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/www-apps/indefero/files/bootstrap.php b/www-apps/indefero/files/bootstrap.php
new file mode 100644
index 0000000..e1ee96f
--- /dev/null
+++ b/www-apps/indefero/files/bootstrap.php
@@ -0,0 +1,22 @@
+<?php
+set_include_path("/usr/share/php/pluf");
+
+require '/<PATH TO INDEFERO>/src/IDF/conf/path.php';
+require 'Pluf.php';
+
+Pluf::start('/<PATH TO INDEFERO>/src/IDF/conf/idf.php');
+Pluf_Dispatcher::loadControllers(Pluf::f('idf_views'));
+
+$user = new Pluf_User();
+$user->first_name = 'Foo';
+$user->last_name = 'Bar'; // Required!
+$user->login = 'foobar'; // must be lowercase!
+$user->email = 'foo@bar.com';
+$user->password = 'foobarbaz'; // the password is salted/hashed
+// in the database, so do not worry :)
+$user->administrator = true;
+$user->active = true;
+$user->create();
+print "Bootstrap ok\n";
+?>
+