summaryrefslogtreecommitdiff
path: root/demos/time-tracker/protected/pages/TimeTracker/UserCreate.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-01-06 22:44:30 +0100
committerDavid <ottodavid@gmx.net>2014-08-21 17:21:19 +0200
commitdcaa0390c1d1335f47f0dd4b8784dc550e3d9f93 (patch)
treefcbf48afd7e8e2ff4811bcdfdc87d1145f855d51 /demos/time-tracker/protected/pages/TimeTracker/UserCreate.php
parentfc0db15ebce101602fb1cbfa8f6a5cc0f8b58be4 (diff)
Removed all @version $Id comments: they were managed by svn and are useless with git
(cherry picked from commit 3e9969766153839abfb7de59e0c778a604bfbf55) Conflicts: framework/Web/UI/ActiveControls/TCallbackClientScript.php framework/Web/UI/JuiControls/TJuiAutoComplete.php framework/Web/UI/JuiControls/TJuiControlAdapter.php framework/Web/UI/JuiControls/TJuiDraggable.php framework/Web/UI/JuiControls/TJuiDroppable.php framework/Web/UI/JuiControls/TJuiResizable.php framework/Web/UI/JuiControls/TJuiSelectable.php framework/Web/UI/JuiControls/TJuiSortable.php
Diffstat (limited to 'demos/time-tracker/protected/pages/TimeTracker/UserCreate.php')
-rwxr-xr-xdemos/time-tracker/protected/pages/TimeTracker/UserCreate.php20
1 files changed, 9 insertions, 11 deletions
diff --git a/demos/time-tracker/protected/pages/TimeTracker/UserCreate.php b/demos/time-tracker/protected/pages/TimeTracker/UserCreate.php
index 2c73752a..34e69713 100755
--- a/demos/time-tracker/protected/pages/TimeTracker/UserCreate.php
+++ b/demos/time-tracker/protected/pages/TimeTracker/UserCreate.php
@@ -6,18 +6,16 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2006 PradoSoft
* @license http://www.pradosoft.com/license/
- * @version $Id: UserCreate.php 3189 2012-07-12 12:16:21Z ctrlaltca $
* @package Demos
*/
/**
* Create new user wizard page class. Validate that the usernames are unique and
* set the new user credentials as the current application credentials.
- *
+ *
* If logged in as admin, the user role can be change during creation.
*
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
- * @version $Id: UserCreate.php 3189 2012-07-12 12:16:21Z ctrlaltca $
* @package Demos
* @since 3.1
*/
@@ -30,11 +28,11 @@ class UserCreate extends TPage
{
if(!$this->IsPostBack)
{
- $this->role->SelectedValue =
+ $this->role->SelectedValue =
$this->Application->Parameters['NewUserRoles'];
}
}
-
+
/**
* Verify that the username is not taken.
* @param TControl custom validator that created the event.
@@ -46,11 +44,11 @@ class UserCreate extends TPage
if($userDao->usernameExists($this->username->Text))
{
$param->IsValid = false;
- $sender->ErrorMessage =
+ $sender->ErrorMessage =
"The user name is already taken, try '{$this->username->Text}01'";
}
}
-
+
/**
* Skip the role assignment step if not admin.
*/
@@ -66,7 +64,7 @@ class UserCreate extends TPage
}
}
}
-
+
/**
* Create a new user if all data entered are valid.
* The default user roles are obtained from "config.xml". The new user
@@ -84,11 +82,11 @@ class UserCreate extends TPage
$newUser->Name = $this->username->Text;
$newUser->IsGuest = false;
$newUser->Roles = $this->role->SelectedValue;
-
+
//save the user
$userDao = $this->Application->Modules['daos']->getDao('UserDao');
$userDao->addNewUser($newUser, $this->password->Text);
-
+
//update the user credentials if not admin
if(!$this->User->isInRole('admin'))
{
@@ -97,7 +95,7 @@ class UserCreate extends TPage
}
}
}
-
+
/**
* Continue with requested page.
*/