summaryrefslogtreecommitdiff
path: root/demos/blog/protected/Pages/Users/NewUser.php
diff options
context:
space:
mode:
authorctrlaltca <>2012-07-12 11:21:01 +0000
committerctrlaltca <>2012-07-12 11:21:01 +0000
commit903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 (patch)
treee08bf04f0823650a231227ac3499121270172a23 /demos/blog/protected/Pages/Users/NewUser.php
parent3e4e6e66aeb3f8fea4e1eb4237498ef9d2358f63 (diff)
standardize the use of unix eol; use svn properties to enforce native eol
Diffstat (limited to 'demos/blog/protected/Pages/Users/NewUser.php')
-rw-r--r--demos/blog/protected/Pages/Users/NewUser.php114
1 files changed, 57 insertions, 57 deletions
diff --git a/demos/blog/protected/Pages/Users/NewUser.php b/demos/blog/protected/Pages/Users/NewUser.php
index 40e79910..50f9f123 100644
--- a/demos/blog/protected/Pages/Users/NewUser.php
+++ b/demos/blog/protected/Pages/Users/NewUser.php
@@ -1,58 +1,58 @@
-<?php
-/**
- * NewUser class file
- *
- * @author Qiang Xue <qiang.xue@gmail.com>
- * @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2006 PradoSoft
- * @license http://www.pradosoft.com/license/
- * @version $Id$
- */
-
-/**
- * NewUser class
- *
- * @author Qiang Xue <qiang.xue@gmail.com>
- * @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2006 PradoSoft
- * @license http://www.pradosoft.com/license/
- */
-class NewUser extends BlogPage
-{
- public function onInit($param)
- {
- if(!$this->User->IsAdmin && !TPropertyValue::ensureBoolean($this->Application->Parameters['MultipleUser']))
- throw new BlogException(500,'newuser_registration_disallowed');
- }
-
- public function checkUsername($sender,$param)
- {
- $username=strtolower($this->Username->Text);
- $param->IsValid=$this->DataAccess->queryUserByName($username)===null;
- }
-
- public function createUser($sender,$param)
- {
- if($this->IsValid)
- {
- $userRecord=new UserRecord;
- $userRecord->Name=strtolower($this->Username->Text);
- $userRecord->FullName=$this->FullName->Text;
- $userRecord->Role=0;
- $userRecord->Password=md5($this->Password->Text);
- $userRecord->Email=$this->Email->Text;
- $userRecord->CreateTime=time();
- $userRecord->Website=$this->Website->Text;
- if(TPropertyValue::ensureBoolean($this->Application->Parameters['AccountApproval']))
- $userRecord->Status=UserRecord::STATUS_PENDING;
- else
- $userRecord->Status=UserRecord::STATUS_NORMAL;
- $this->DataAccess->insertUser($userRecord);
- $authManager=$this->Application->getModule('auth');
- $authManager->login($this->Username->Text,$this->Password->Text);
- $this->gotoDefaultPage();
- }
- }
-}
-
+<?php
+/**
+ * NewUser class file
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2006 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @version $Id$
+ */
+
+/**
+ * NewUser class
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2006 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ */
+class NewUser extends BlogPage
+{
+ public function onInit($param)
+ {
+ if(!$this->User->IsAdmin && !TPropertyValue::ensureBoolean($this->Application->Parameters['MultipleUser']))
+ throw new BlogException(500,'newuser_registration_disallowed');
+ }
+
+ public function checkUsername($sender,$param)
+ {
+ $username=strtolower($this->Username->Text);
+ $param->IsValid=$this->DataAccess->queryUserByName($username)===null;
+ }
+
+ public function createUser($sender,$param)
+ {
+ if($this->IsValid)
+ {
+ $userRecord=new UserRecord;
+ $userRecord->Name=strtolower($this->Username->Text);
+ $userRecord->FullName=$this->FullName->Text;
+ $userRecord->Role=0;
+ $userRecord->Password=md5($this->Password->Text);
+ $userRecord->Email=$this->Email->Text;
+ $userRecord->CreateTime=time();
+ $userRecord->Website=$this->Website->Text;
+ if(TPropertyValue::ensureBoolean($this->Application->Parameters['AccountApproval']))
+ $userRecord->Status=UserRecord::STATUS_PENDING;
+ else
+ $userRecord->Status=UserRecord::STATUS_NORMAL;
+ $this->DataAccess->insertUser($userRecord);
+ $authManager=$this->Application->getModule('auth');
+ $authManager->login($this->Username->Text,$this->Password->Text);
+ $this->gotoDefaultPage();
+ }
+ }
+}
+
?> \ No newline at end of file