fixing nasty bug with display_username return value
authorToby Elliott <telliott@mozilla.com>
Fri, 29 May 2009 13:23:59 -0700
changeset 992 a9bcd23b6fe239bbfc1d3ae4133acf964dcb6c00
parent 991 04c2da4bf67746c262a7bf7edf15cd735214e987
child 993 c4467427055493daa30d97e8a85e284341096db4
push id626
push usertelliott@mozilla.com
push dateFri, 29 May 2009 20:24:03 +0000
fixing nasty bug with display_username return value
server/lib/user.php
--- a/server/lib/user.php
+++ b/server/lib/user.php
@@ -42,17 +42,17 @@ class PersonaUser
 	function get_username()
 	{
 		return $this->_username;
 	}
 	
 	function get_description($username = null)
 	{
 		if (!$username)
-			$username = $this->_description;
+			return $this->_description;
 			
 		try
 		{
 			$select_stmt = 'select description from users where username = :username';
 			$sth = $this->_dbh->prepare($select_stmt);
 			$sth->bindParam(':username', $username);
 			$sth->execute();
 		}
@@ -63,17 +63,17 @@ class PersonaUser
 		}
 		return $sth->fetchColumn();		
 	}
 	
 	
 	function get_display_username($username = null)
 	{
 		if (!$username)
-			$username = $this->_display_username;
+			return $this->_display_username;
 			
 		try
 		{
 			$select_stmt = 'select display_username from users where username = :username';
 			$sth = $this->_dbh->prepare($select_stmt);
 			$sth->bindParam(':username', $username);
 			$sth->execute();
 		}