This repository has been archived by the owner. It is now read-only.

JUser bind #1741

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+18 −18
Split
@@ -546,24 +546,6 @@ public function bind(&$array)
// Set the registration timestamp
$this->set('registerDate', JFactory::getDate()->toSql());
-
- // Check that username is not greater than 150 characters
- $username = $this->get('username');
-
- if (strlen($username) > 150)
- {
- $username = substr($username, 0, 150);
- $this->set('username', $username);
- }
-
- // Check that password is not greater than 100 characters
- $password = $this->get('password');
-
- if (strlen($password) > 100)
- {
- $password = substr($password, 0, 100);
- $this->set('password', $password);
- }
}
else
{
@@ -615,6 +597,24 @@ public function bind(&$array)
return false;
}
+ // Check that username is not greater than 150 characters
@eddieajau

eddieajau Dec 8, 2012

Contributor

Seems to be one too many indents here?

@fanno

fanno Dec 8, 2012

Contributor

This is my first pull request so i do not know what the normal process is ? i do not understand your comment/note ??

+ $username = $this->get('username');
+
+ if (strlen($username) > 150)
+ {
+ $username = substr($username, 0, 150);
+ $this->set('username', $username);
+ }
+
+ // Check that password is not greater than 100 characters
+ $password = $this->get('password');
+
+ if (strlen($password) > 100)
+ {
+ $password = substr($password, 0, 100);
+ $this->set('password', $password);
+ }
+
// Make sure its an integer
$this->id = (int) $this->id;