From b6e12bedc51b56cf0f1a5930e69a4c377cd3dfe5 Mon Sep 17 00:00:00 2001 From: jrags <> Date: Thu, 21 Sep 2006 00:57:53 +0000 Subject: Added providers demo, sqlmembershipprovider sqlroleprovider both load via modules now, but are not totaly functional yet. TLogin* controls created but not functional yet. --- framework/Web/Security/TMembershipUser.php | 123 +++++++++++++---------------- 1 file changed, 54 insertions(+), 69 deletions(-) (limited to 'framework/Web/Security/TMembershipUser.php') diff --git a/framework/Web/Security/TMembershipUser.php b/framework/Web/Security/TMembershipUser.php index 722459fc..ad7b9f78 100644 --- a/framework/Web/Security/TMembershipUser.php +++ b/framework/Web/Security/TMembershipUser.php @@ -8,39 +8,28 @@ * @package System.Web.Security * @since 3.1 */ +Prado::using('System.Web.Security.TProviderException'); +Prado::using('System.Web.Security.TMembership'); class TMembershipUser { - public $Comment; - public $CreationDate; - public $Email; - public $IsApproved=false; - public $IsLockedOut=false; - public $IsOnline=false; - public $LastActivityDate; - public $LastLockoutDate; - public $LastLoginDate; - public $LastPasswordChangedDate; - public $PasswordQuestion; - public $ProviderName; - public $ProviderUserKey; - public $UserName; - private $_Comment; - private $_CreationDate; - private $_Email; - private $_IsApproved=false; - private $_IsLockedOut=false; - private $_LastActivityDate; - private $_LastLockoutDate; - private $_LastLoginDate; - private $_LastPasswordChangedDate; - private $_PasswordQuestion; - private $_ProviderName; - private $_ProviderUserKey; - private $_UserName; + private $_comment; + private $_creationDate; + private $_email; + private $_isApproved=false; + private $_isLockedOut=false; + private $_isOnline=false; + private $_lastActivityDate; + private $_lastLockoutDate; + private $_lastLoginDate; + private $_lastPasswordChangedDate; + private $_passwordQuestion; + private $_providerName; + private $_providerUserKey; + private $_userName; public function __construct($providerName=null,$name=null,$providerUserKey=null,$email=null,$passwordQuestion=null,$comment=null,$isApproved=null,$isLockedOut=null,$creationDate=null,$lastLoginDate=null,$lastActivityDate=null,$lastPasswordChangedDate=null,$lastLockoutDate=null) { - if (($providerName===null) || (TMembership===null)) + if (($providerName===null) || (TMembership::getProviders($providerName)===null)) { throw new TProviderException('Membership_provider_name_invalid',$providerName); } @@ -56,123 +45,119 @@ class TMembershipUser { $passwordQuestion = trim($passwordQuestion); } - $this->_ProviderName = $providerName; - $this->_UserName = $name; - $this->_ProviderUserKey = $providerUserKey; - $this->_Email = $email; - $this->_PasswordQuestion = $passwordQuestion; - $this->_Comment = $comment; - $this->_IsApproved = $isApproved; - $this->_IsLockedOut = $isLockedOut; - $this->_CreationDate = $creationDate; - $this->_LastLoginDate = $lastLoginDate; - $this->_LastActivityDate = $lastActivityDate; - $this->_LastPasswordChangedDate = $lastPasswordChangedDate; - $this->_LastLockoutDate = $lastLockoutDate; + $this->_providerName = $providerName; + $this->_userName = $name; + $this->_providerUserKey = $providerUserKey; + $this->_email = $email; + $this->_passwordQuestion = $passwordQuestion; + $this->_comment = $comment; + $this->_isApproved = $isApproved; + $this->_isLockedOut = $isLockedOut; + $this->_creationDate = $creationDate; + $this->_lastLoginDate = $lastLoginDate; + $this->_lastActivityDate = $lastActivityDate; + $this->_lastPasswordChangedDate = $lastPasswordChangedDate; + $this->_lastLockoutDate = $lastLockoutDate; } public function getComment() { - return $this->Comment; + return $this->_comment; } public function setApplicationName($value) { - $this->Comment = TPropertyValue::ensureString($value); + $this->_comment = TPropertyValue::ensureString($value); } public function getCreationDate() { - return $this->CreationDate; + return $this->_creationDate; } public function getEmail() { - return $this->Email; + return $this->_email; } public function setEmail($value) { - $this->Email = TPropertyValue::ensureString($value); + $this->_email = TPropertyValue::ensureString($value); } public function getIsApproved() { - return $this->IsApproved; + return $this->_isApproved; } public function setIsApproved($value) { - $this->IsApproved = TPropertyValue::ensureBoolean($value); + $this->_isApproved = TPropertyValue::ensureBoolean($value); } public function getIsLockedOut() { - return $this->IsLockedOut; + return $this->_isLockedOut; } public function getIsOnline() { - return $this->IsOnline; + return $this->_isOnline; } public function getLastActivityDate() { - return $this->LastActivityDate; + return $this->_lastActivityDate; } public function setLastActivityDate($value) { - $this->LastActivityDate = TPropertyValue::ensureString($value); + $this->_lastActivityDate = TPropertyValue::ensureString($value); } public function getLastLockoutDate() { - return $this->LastLockoutDate; + return $this->_lastLockoutDate; } public function getLastLoginDate() { - return $this->LastLoginDate; + return $this->_lastLoginDate; } public function setLastLoginDate($value) { - $this->LastLoginDate = TPropertyValue::ensureString($value); + $this->_lastLoginDate = TPropertyValue::ensureString($value); } public function getLastPasswordChangedDate() { - return $this->LastPasswordChangedDate; - } - public function getLastPasswordChangedDate() - { - return $this->LastPasswordChangedDate; + return $this->_lastPasswordChangedDate; } public function getPasswordQuestion() { - return $this->PasswordQuestion; + return $this->_passwordQuestion; } public function getProviderUserKey() { - return $this->ProviderUserKey; + return $this->_providerUserKey; } public function getUserName() { - return $this->UserName; + return $this->_userName; } - public function ChangePassword($oldPassword,$newPassword,$throwOnError=null) + public function changePassword($oldPassword,$newPassword,$throwOnError=null) { } - public function GetPassword() + public function getPassword() { // $throwOnError; // $passwordAnswer; // $answer; // $answer,$useAnswer,$throwOnError; } - public function ResetPassword() + public function resetPassword() { // $throwOnError; // $passwordAnswer; // $answer; // $answer,$useAnswer,$throwOnError; } - public function UnlockUser() + public function unlockUser() { } - public function Update() + public function update() { } - private function UpdateSelf() + private function updateSelf() { } -- cgit v1.2.3