From 15a09c5d694f720ef50f9c82860193545233bcf1 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 20 Jun 2008 03:17:00 -0400 Subject: change from using tag uris to http urls for identifiers Weirdly, I got in an argument with Tim Berners-Lee in #swig about the tag URIs I was using in FOAF documents. Eventually, I was convinced that it's a better thing to use HTTP URLs instead. So, now we have HTTP URLs. The tricky thing was for users. Since they can change their names, we can't use their profile URL, since it includes the name. Instead, I made up a new action, which simply redirects from a user ID to their current profile URL. This should be sufficiently long-term. darcs-hash:20080620071700-84dde-c6145243dc45dd2dff621aff421375d05796057e.gz --- actions/userbyid.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 actions/userbyid.php (limited to 'actions/userbyid.php') diff --git a/actions/userbyid.php b/actions/userbyid.php new file mode 100644 index 000000000..9de32406a --- /dev/null +++ b/actions/userbyid.php @@ -0,0 +1,36 @@ +. + */ + +if (!defined('LACONICA')) { exit(1); } + +class UserbyidAction extends Action { + function handle($args) { + parent::handle($args); + $id = $this->trimmed('id'); + if (!$id) { + $this->client_error(_t('No id.')); + } + $user =& User::staticGet($id); + if (!$id) { + $this->client_error(_t('No such user.')); + } + common_redirect('showstream', + array('nickname' => $user->nickname)); + } +} -- cgit v1.2.3-54-g00ecf