Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Added profile redirects to quicksocial.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchisari authored and The Appleseed Project committed Oct 23, 2010
1 parent 5c912eb commit c36409e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions hooks/quicksocial/quicksocial.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,25 @@ public function CreateFriendRemovelink ( $pData ) {
return ( $return );
}

public function CreateUserLink ( $pData ) {

$account = $pData['account'];

list ( $accountUsername, $accountDomain ) = explode ( '@', $account );

$source = QUICKSOCIAL_DOMAIN;

if ( $source == $accountDomain ) {
$return = 'http://' . $source . '/profile/' . $accountUsername;
} else {
$data = array ( '_social' => 'true', '_task' => 'redirect', '_action' => 'profile', '_account' => $account, '_source' => $source );

$return = 'http://' . $accountDomain . '/?' . http_build_query ( $data );
}

return ( $return );
}

public function OnUserInfo ( $pData ) {

if (!class_exists ( 'cQuickUser' ) ) require ( ASD_PATH . 'hooks' . DS . 'quicksocial' . DS . 'libraries' . DS . 'QuickSocial-0.1.0' . DS . 'quickuser.php' );
Expand Down Expand Up @@ -918,6 +937,7 @@ public function _Redirect ( $pAction, $pAccount, $pRequest = null, $pSource = nu
case 'notifications':
break;
case 'profile':
$redirect = '/profile/' . $accountUsername . '/';
break;
default:
$redirect = '/';
Expand Down

0 comments on commit c36409e

Please sign in to comment.