From da257cc3c8078f1f345b81407a1cf846f0d636f4 Mon Sep 17 00:00:00 2001 From: Michael Chisari Date: Tue, 12 Apr 2011 20:05:49 -0500 Subject: [PATCH] Renamed UserInformation back to UserProfile (more descriptive) --- _release/update-0.7.10.sql | 9 ++++-- components/login/controllers/login.php | 18 ++++++------ components/user/user.php | 40 +++++++++++++------------- hooks/quicksocial/quicksocial.php | 6 ++-- 4 files changed, 38 insertions(+), 35 deletions(-) diff --git a/_release/update-0.7.10.sql b/_release/update-0.7.10.sql index c7d396c7..940df6ee 100644 --- a/_release/update-0.7.10.sql +++ b/_release/update-0.7.10.sql @@ -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 diff --git a/components/login/controllers/login.php b/components/login/controllers/login.php index 842e23fd..8e890bcf 100644 --- a/components/login/controllers/login.php +++ b/components/login/controllers/login.php @@ -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 ) ); @@ -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; @@ -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. diff --git a/components/user/user.php b/components/user/user.php index 3a1f54c0..edf16b6f 100644 --- a/components/user/user.php +++ b/components/user/user.php @@ -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; @@ -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; @@ -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; diff --git a/hooks/quicksocial/quicksocial.php b/hooks/quicksocial/quicksocial.php index cb356773..8b6ba31f 100644 --- a/hooks/quicksocial/quicksocial.php +++ b/hooks/quicksocial/quicksocial.php @@ -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' ) ) ); @@ -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' ); @@ -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 ) );