aboutsummaryrefslogtreecommitdiffstats
path: root/mod/id.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-03-15 16:48:45 -0700
committerfriendica <info@friendica.com>2015-03-15 16:48:45 -0700
commit6da40fc559f540e67802f771411aa9f85dc8d64d (patch)
tree1195a967c1d49dcf20f9abe0fdbb633ec240a1e1 /mod/id.php
parent92470eb0f2f053363cdfaec7a7df18c85ffc74bc (diff)
downloadvolse-hubzilla-6da40fc559f540e67802f771411aa9f85dc8d64d.tar.gz
volse-hubzilla-6da40fc559f540e67802f771411aa9f85dc8d64d.tar.bz2
volse-hubzilla-6da40fc559f540e67802f771411aa9f85dc8d64d.zip
mod_id: load profile so the sidebar profile will work
Diffstat (limited to 'mod/id.php')
-rw-r--r--mod/id.php54
1 files changed, 15 insertions, 39 deletions
diff --git a/mod/id.php b/mod/id.php
index 378022717..6678004c5 100644
--- a/mod/id.php
+++ b/mod/id.php
@@ -2,45 +2,21 @@
function id_init(&$a) {
-logger('id: ' . print_r($_REQUEST,true));
-
-/**
- * This example shows several things:
- * - How a setup interface should look like.
- * - How to use a mysql table for authentication
- * - How to store associations in mysql table, instead of php sessions.
- * - How to store realm authorizations.
- * - How to send AX/SREG parameters.
- * For the example to work, you need to create the necessary tables:
-CREATE TABLE Users (
- id INT NOT NULL auto_increment PRIMARY KEY,
- login VARCHAR(32) NOT NULL,
- password CHAR(40) NOT NULL,
- firstName VARCHAR(32) NOT NULL,
- lastName VARCHAR(32) NOT NULL
-);
-
-CREATE TABLE AllowedSites (
- user INT NOT NULL,
- realm TEXT NOT NULL,
- attributes TEXT NOT NULL,
- INDEX(user)
-);
-
-CREATE TABLE Associations (
- id INT NOT NULL PRIMARY KEY,
- data TEXT NOT NULL
-);
- *
- * This is only an example. Don't use it in your code as-is.
- * It has several security flaws, which you shouldn't copy (like storing plaintext login and password in forms).
- *
- * This setup could be very easily flooded with many associations,
- * since non-private ones aren't automatically deleted.
- * You could prevent this by storing a date of association and removing old ones,
- * or by setting $this->dh = false;
- * However, the latter one would disable stateful mode, unless connecting via HTTPS.
- */
+ logger('id: ' . print_r($_REQUEST,true));
+
+
+ if(argc() > 1)
+ $which = argv(1);
+ else {
+ $a->error = 404;
+ return;
+ }
+
+ $profile = '';
+ $channel = $a->get_channel();
+ profile_load($a,$which,$profile);
+
+
require 'library/openid/provider/provider.php';