diff options
author | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
---|---|---|
committer | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
commit | 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 (patch) | |
tree | e08bf04f0823650a231227ac3499121270172a23 /demos/chat/protected/pages/Login.php | |
parent | 3e4e6e66aeb3f8fea4e1eb4237498ef9d2358f63 (diff) |
standardize the use of unix eol; use svn properties to enforce native eol
Diffstat (limited to 'demos/chat/protected/pages/Login.php')
-rw-r--r-- | demos/chat/protected/pages/Login.php | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/demos/chat/protected/pages/Login.php b/demos/chat/protected/pages/Login.php index 831ab925..ec39f1f0 100644 --- a/demos/chat/protected/pages/Login.php +++ b/demos/chat/protected/pages/Login.php @@ -1,40 +1,40 @@ -<?php
-
-class Login extends TPage
-{
- /**
- * Check that the username is not already taken.
- * @param TControl custom validator that created the event.
- * @param TServerValidateEventParameter validation parameters.
- */
- function checkUsername($sender, $param)
- {
- $manager = $this->Application->Modules['users'];
- if($manager->usernameExists($this->username->Text))
- $param->IsValid = false;
- }
-
- /**
- * Create and login a new user, then redirect to the requested page.
- * @param TControl button control that created the event.
- * @param TEventParameter event parameters.
- */
- function createNewUser($sender, $param)
- {
- if($this->Page->IsValid)
- {
- $manager = $this->Application->Modules['users'];
- $manager->addNewUser($this->username->Text);
-
- //do manual login
- $user = $manager->getUser($this->username->Text);
- $auth = $this->Application->Modules['auth'];
- $auth->updateSessionUser($user);
- $this->Application->User = $user;
-
- $this->Response->redirect($auth->ReturnUrl);
- }
- }
-}
-
+<?php + +class Login extends TPage +{ + /** + * Check that the username is not already taken. + * @param TControl custom validator that created the event. + * @param TServerValidateEventParameter validation parameters. + */ + function checkUsername($sender, $param) + { + $manager = $this->Application->Modules['users']; + if($manager->usernameExists($this->username->Text)) + $param->IsValid = false; + } + + /** + * Create and login a new user, then redirect to the requested page. + * @param TControl button control that created the event. + * @param TEventParameter event parameters. + */ + function createNewUser($sender, $param) + { + if($this->Page->IsValid) + { + $manager = $this->Application->Modules['users']; + $manager->addNewUser($this->username->Text); + + //do manual login + $user = $manager->getUser($this->username->Text); + $auth = $this->Application->Modules['auth']; + $auth->updateSessionUser($user); + $this->Application->User = $user; + + $this->Response->redirect($auth->ReturnUrl); + } + } +} + ?>
\ No newline at end of file |