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

Commit

Permalink
Browse files Browse the repository at this point in the history
Renamed UserInformation back to UserProfile (more descriptive)
  • Loading branch information
michaelchisari committed Apr 13, 2011
1 parent 7a39f37 commit da257cc
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 35 deletions.
9 changes: 6 additions & 3 deletions _release/update-0.7.10.sql
Expand Up @@ -180,22 +180,25 @@ CREATE TABLE #__UserSessions ( `Session_PK` INTEGER NOT NULL PRIMARY KEY, `Accou
# userInformation

drop table #__userInformation;

# userProfile

CREATE TABLE `#__UserInformation` (
CREATE TABLE `#___UserProfile` (
`Account_FK` int(11) NOT NULL,
`Fullname` char(64) DEFAULT NULL,
`Alias` char(64) DEFAULT NULL,
`Description` text
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

insert into #__UserInformation select userAuth_uID, Fullname, Alias, Description from #__userProfile;
insert into #___UserProfile select userAuth_uID, Fullname, Alias, Description from #__userProfile;

alter table #__userAuthorization add `Email` char(128) NOT NULL;

update `#__userAuthorization` AS `a` set `a`.`Email` = ( select `p`.`Email` FROM `#__userProfile` AS `p` WHERE `p`.`userAuth_uID` = `a`.`uID` );

drop table #__userProfile;
drop table `#__userProfile`;

alter table `#___UserProfile` rename `#__UserProfile`;

# messageNotification

Expand Down
18 changes: 9 additions & 9 deletions components/login/controllers/login.php
Expand Up @@ -337,7 +337,7 @@ function Join ( ) {
$newpass = $this->GetSys ( "Crypt" )->Encrypt ( $password );

$UserAccounts = new cModel ( 'UserAccounts' );
$UserInformation = new cModel ( 'UserInformation' );
$UserProfile = new cModel ( 'UserProfile' );

// Check for existing username.
$UserAccounts->Retrieve ( array ( "Username" => $username ) );
Expand Down Expand Up @@ -447,11 +447,11 @@ function _EmailAccepted ( $pSenderId, $pRecipientId ) {

$Recipient = $UserAccounts->Get ( 'Username' ) . '@' . ASD_DOMAIN;

$UserInformation = new cModel ( 'UserInformation' );
$UserInformation->Structure();
$UserProfile = new cModel ( 'UserProfile' );
$UserProfile->Structure();

$UserInformation->Retrieve ( array ( 'Account_FK' => $pRecipientId ) );
$UserInformation->Fetch();
$UserProfile->Retrieve ( array ( 'Account_FK' => $pRecipientId ) );
$UserProfile->Fetch();

$Email = $UserAccounts->Get ( 'Email' );
$Recipient = $UserAccounts->Get ( 'Username' ) . '@' . ASD_DOMAIN;
Expand Down Expand Up @@ -506,14 +506,14 @@ function Forgot ( $pView = null, $pData = null ) {
return ( $this->Display ( $pView, $pData ) );
}

$UserInformation = new cModel ( 'UserInformation' );
$UserInformation->Retrieve ( $UserAccounts->Get ( "Account_PK" ) );
$UserInformation->Fetch();
$UserProfile = new cModel ( 'UserProfile' );
$UserProfile->Retrieve ( $UserAccounts->Get ( "Account_PK" ) );
$UserProfile->Fetch();

$newpass = $this->GetSys ( "Crypt" )->Encrypt ( $newpassword );

$to = $UserAccounts->Get ( "Email" );
$toName = $UserInformation->Get ( "Fullname" );
$toName = $UserProfile->Get ( "Fullname" );

if ( !$this->ForgotEmail( $to, $username, $newpassword ) ) {
// Couldn't send out the message, so error without resetting the pw.
Expand Down
40 changes: 20 additions & 20 deletions components/user/user.php
Expand Up @@ -204,11 +204,11 @@ private function _LocalLoggedIn ( $pSession ) {
$this->Username = $UserAccounts->Get ( "Username" );

// Load the user profile information.
$UserInformation = new cModel ( "UserInformation" );
$UserInformation->Retrieve ( array ( "Account_FK" => $sessionModel->Get ( "Account_FK" ) ) );
$UserInformation->Fetch();
$UserProfile = new cModel ( "UserProfile" );
$UserProfile->Retrieve ( array ( "Account_FK" => $sessionModel->Get ( "Account_FK" ) ) );
$UserProfile->Fetch();

$this->Fullname = $UserInformation->Get ( "Fullname" );
$this->Fullname = $UserProfile->Get ( "Fullname" );
$this->Domain = $_SERVER['HTTP_HOST'];

$this->Remote = false;
Expand Down Expand Up @@ -249,18 +249,18 @@ public function Focus ( $pUsername ) {
$this->Id = $UserAccounts->Get ( "Account_PK" );

// Load the user profile information.
$UserInformation = new cModel ( "UserInformation" );
$UserInformation->Retrieve ( array ( "Account_FK" => $UserAccounts->Get ( "Account_PK" ) ) );
$UserInformation->Fetch();
$UserProfile = new cModel ( "UserProfile" );
$UserProfile->Retrieve ( array ( "Account_FK" => $UserAccounts->Get ( "Account_PK" ) ) );
$UserProfile->Fetch();

$this->Account_PK = $UserInformation->Get ( "Account_FK" );
$this->Account_PK = $UserProfile->Get ( "Account_FK" );

if ( $UserInformation->Get ( "Alias" ) )
$this->Fullname = $UserInformation->Get ( "Alias" );
if ( $UserProfile->Get ( "Alias" ) )
$this->Fullname = $UserProfile->Get ( "Alias" );
else
$this->Fullname = $UserInformation->Get ( "Fullname" );
$this->Fullname = $UserProfile->Get ( "Fullname" );

$this->Description = $UserInformation->Get ( "Description" );
$this->Description = $UserProfile->Get ( "Description" );
$this->Domain = $_SERVER['HTTP_HOST'];

$this->Account = $this->Username . '@' . $this->Domain;
Expand Down Expand Up @@ -290,18 +290,18 @@ public function Load ( $pUser ) {
$this->Id = $UserAccounts->Get ( "Account_PK" );

// Load the user profile information.
$UserInformation = new cModel ( "UserInformation" );
$UserInformation->Retrieve ( array ( "Account_FK" => $UserAccounts->Get ( "Account_PK" ) ) );
$UserInformation->Fetch();
$UserProfile = new cModel ( "UserProfile" );
$UserProfile->Retrieve ( array ( "Account_FK" => $UserAccounts->Get ( "Account_PK" ) ) );
$UserProfile->Fetch();

$this->Account_PK = $UserInformation->Get ( "Account_FK" );
$this->Account_PK = $UserProfile->Get ( "Account_FK" );

if ( $UserInformation->Get ( "Alias" ) )
$this->Fullname = $UserInformation->Get ( "Alias" );
if ( $UserProfile->Get ( "Alias" ) )
$this->Fullname = $UserProfile->Get ( "Alias" );
else
$this->Fullname = $UserInformation->Get ( "Fullname" );
$this->Fullname = $UserProfile->Get ( "Fullname" );

$this->Description = $UserInformation->Get ( "Description" );
$this->Description = $UserProfile->Get ( "Description" );
$this->Domain = $_SERVER['HTTP_HOST'];

$this->Account = $this->Username . '@' . $this->Domain;
Expand Down
6 changes: 3 additions & 3 deletions hooks/quicksocial/quicksocial.php
Expand Up @@ -836,7 +836,7 @@ public function _UserInfo ( $pAccount, $pRequest, $pVerified = false ) {

if ( !$auth->Get ( 'Username' ) ) return ( false );

$profile = new cModel ('UserInformation');
$profile = new cModel ('UserProfile');
$profile->Structure();

$profile->Retrieve ( array ( 'Account_FK' => $auth->Get ( 'Account_PK' ) ) );
Expand Down Expand Up @@ -934,7 +934,7 @@ public function _FriendAdd ( $pAccount, $pRequest ) {
$userModel = new cModel ( 'UserAccounts' );
$userModel->Structure();

$profileModel = new cModel ( 'UserInformation' );
$profileModel = new cModel ( 'UserProfile' );
$profileModel->Structure();

$friendModel = new cModel ( 'FriendInformation' );
Expand Down Expand Up @@ -987,7 +987,7 @@ public function _FriendApprove ( $pAccount, $pRequest ) {
list ( $requestUsername, $requestDomain ) = explode ( '@', $pRequest );
list ( $accountUsername, $accountDomain ) = explode ( '@', $pAccount );

$profileModel = new cModel ( 'UserInformation' );
$profileModel = new cModel ( 'UserProfile' );
$profileModel->Structure();

$userModel->Retrieve ( array ( 'Username' => $requestUsername ) );
Expand Down

0 comments on commit da257cc

Please sign in to comment.