Author: jablko
Date: 2008-12-11 17:52:59 -0800 (Thu, 11 Dec 2008)
New Revision: 1674

Modified:
   trunk/qubit/apps/qubit/lib/myUser.class.php
   trunk/qubit/apps/qubit/modules/user/actions/updateAction.class.php
   trunk/qubit/apps/qubit/modules/user/templates/createSuccess.php
   trunk/qubit/apps/qubit/modules/user/templates/editSuccess.php
   trunk/qubit/apps/qubit/modules/user/templates/passwordEditSuccess.php
   trunk/qubit/apps/qubit/modules/user/templates/showSuccess.php
   trunk/qubit/lib/model/QubitUser.php
   trunk/qubit/test/selenium/Test_suite_3/Test_1_Create_user.html
Log:
Fix username spelling and update Selenium test. Fixes issue #544


Modified: trunk/qubit/apps/qubit/lib/myUser.class.php
===================================================================
--- trunk/qubit/apps/qubit/lib/myUser.class.php 2008-12-11 08:21:00 UTC (rev 
1673)
+++ trunk/qubit/apps/qubit/lib/myUser.class.php 2008-12-12 01:52:59 UTC (rev 
1674)
@@ -31,7 +31,7 @@
     }
 
     $this->setAttribute('user_id', $user->getId());
-    $this->setAttribute('user_name', $user->getUserName());
+    $this->setAttribute('user_name', $user->username);
   }
 
   public function signOut()
@@ -63,13 +63,13 @@
   {
     $authenticated = false;
     $error = null;
-    
+
     // anonymous is not a real user
     if ($username == 'anonymous')
     {
       $error = 'invalid username';
     }
-    
+
     $user = QubitUser::checkCredentials($username, $password, &$error);
 
     // user account exists?
@@ -78,7 +78,7 @@
       $authenticated = true;
       $this->signIn($user);
     }
-    
+
     return $authenticated;
   }
 }

Modified: trunk/qubit/apps/qubit/modules/user/actions/updateAction.class.php
===================================================================
--- trunk/qubit/apps/qubit/modules/user/actions/updateAction.class.php  
2008-12-11 08:21:00 UTC (rev 1673)
+++ trunk/qubit/apps/qubit/modules/user/actions/updateAction.class.php  
2008-12-12 01:52:59 UTC (rev 1674)
@@ -34,7 +34,7 @@
       $this->forward404Unless($user);
     }
     $user->setId($this->getRequestParameter('id'));
-    $user->setUserName($this->getRequestParameter('user_name'));
+    $user->username = $this->getRequestParameter('username');
     $user->setEmail($this->getRequestParameter('email'));
 
     $user->save();
@@ -50,7 +50,7 @@
     // if we are editing the current user, update the symfony user session 
($this->getUser())
     if ($user->getId() == $this->getUser()->getAttribute('user_id'))
       {
-        $this->getUser()->setAttribute('user_name', $user->getUserName());
+        $this->getUser()->setAttribute('user_name', $user->username);
         //reset Credentials
         $this->getUser()->clearCredentials();
         foreach ($user->getRoles() as $role)

Modified: trunk/qubit/apps/qubit/modules/user/templates/createSuccess.php
===================================================================
--- trunk/qubit/apps/qubit/modules/user/templates/createSuccess.php     
2008-12-11 08:21:00 UTC (rev 1673)
+++ trunk/qubit/apps/qubit/modules/user/templates/createSuccess.php     
2008-12-12 01:52:59 UTC (rev 1674)
@@ -12,7 +12,7 @@
 <tr>
   <th><?php echo __('user name'); ?></th>
   <td>
-      <?php echo object_input_tag($user, 'getUserName', array ('size' => 20,)) 
?>
+      <?php echo object_input_tag($user, 'getUsername', array ('size' => 20)) 
?>
    </td>
 </tr>
 

Modified: trunk/qubit/apps/qubit/modules/user/templates/editSuccess.php
===================================================================
--- trunk/qubit/apps/qubit/modules/user/templates/editSuccess.php       
2008-12-11 08:21:00 UTC (rev 1673)
+++ trunk/qubit/apps/qubit/modules/user/templates/editSuccess.php       
2008-12-12 01:52:59 UTC (rev 1674)
@@ -7,13 +7,13 @@
 <table class="detail">
 <tbody>
 
-<tr><td colspan="2" class="headerCell"><?php echo link_to(__('%1% profile', 
array('%1%' =>$user->getUserName())), 'user/show?id='.$user->getId()) 
?></td></tr>
+<tr><td colspan="2" class="headerCell"><?php echo link_to(__('%1% profile', 
array('%1%' => $user)), array('module' => 'user', 'action' => 'show', 'id' => 
$user->id)) ?></td></tr>
 <tr>
 
 <tr>
   <th><?php echo __('user name'); ?></th>
   <td>
-      <?php echo object_input_tag($user, 'getUserName', array ('size' => 20)) 
?>
+      <?php echo object_input_tag($user, 'getUsername', array ('size' => 20)) 
?>
    </td>
 </tr>
 

Modified: trunk/qubit/apps/qubit/modules/user/templates/passwordEditSuccess.php
===================================================================
--- trunk/qubit/apps/qubit/modules/user/templates/passwordEditSuccess.php       
2008-12-11 08:21:00 UTC (rev 1673)
+++ trunk/qubit/apps/qubit/modules/user/templates/passwordEditSuccess.php       
2008-12-12 01:52:59 UTC (rev 1674)
@@ -8,7 +8,7 @@
 <tbody>
 
 <tr><td colspan="2" class="headerCell">
-    <?php echo __('reset password: %1%', array('%1%' =>$user->getUserName())) 
?>
+    <?php echo __('reset password: %1%', array('%1%' => $user)) ?>
 </td></tr>
 
 <th><?php echo __('new password'); ?></th>

Modified: trunk/qubit/apps/qubit/modules/user/templates/showSuccess.php
===================================================================
--- trunk/qubit/apps/qubit/modules/user/templates/showSuccess.php       
2008-12-11 08:21:00 UTC (rev 1673)
+++ trunk/qubit/apps/qubit/modules/user/templates/showSuccess.php       
2008-12-12 01:52:59 UTC (rev 1674)
@@ -4,14 +4,14 @@
 <tbody>
 <tr><td colspan="2" class="headerCell">
 <?php if (SecurityCheck::HasPermission($sf_user, array('module' => 'user', 
'action' => 'edit'))): ?>
-    <?php echo link_to(__('%1% profile', array('%1%' =>$user->getUserName())), 
'user/edit?id='.$user->getId()) ?>
+    <?php echo link_to(__('%1% profile', array('%1%' => $user)), 
array('module' => 'user', 'action' => 'edit', 'id' => $user->id)) ?>
   <?php else: ?>
-    <?php echo $user->getUserName().' Profile' ?>
+    <?php echo $user.' Profile' ?>
   <?php endif; ?>
 </td></tr>
 <tr>
 <th><?php echo __('user name'); ?></th>
-<td><?php echo $user->getUserName() ?></td>
+<td><?php echo $user->username ?></td>
 </tr>
 <tr>
 <th><?php echo __('email'); ?></th>

Modified: trunk/qubit/lib/model/QubitUser.php
===================================================================
--- trunk/qubit/lib/model/QubitUser.php 2008-12-11 08:21:00 UTC (rev 1673)
+++ trunk/qubit/lib/model/QubitUser.php 2008-12-12 01:52:59 UTC (rev 1674)
@@ -26,7 +26,7 @@
 {
   public function __toString()
   {
-    return (string) $this->getUserName();
+    return (string) $this->username;
   }
 
   public function setPassword($password)

Modified: trunk/qubit/test/selenium/Test_suite_3/Test_1_Create_user.html
===================================================================
--- trunk/qubit/test/selenium/Test_suite_3/Test_1_Create_user.html      
2008-12-11 08:21:00 UTC (rev 1673)
+++ trunk/qubit/test/selenium/Test_suite_3/Test_1_Create_user.html      
2008-12-12 01:52:59 UTC (rev 1674)
@@ -68,7 +68,7 @@
 </tr>
 <tr>
        <td>type</td>
-       <td>user_name</td>
+       <td>username</td>
        <td>Hilary Jenkinson</td>
 </tr>
 <tr>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to