summaryrefslogtreecommitdiff
path: root/classes/User.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/User.php')
-rw-r--r--classes/User.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/classes/User.php b/classes/User.php
index 8effd856a..16cafa635 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -1,18 +1,18 @@
<?php
-/*
+/*
* Laconica - a distributed open-source microblogging tool
* Copyright (C) 2008, Controlez-Vous, Inc.
- *
+ *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -24,7 +24,7 @@ if (!defined('LACONICA')) { exit(1); }
require_once 'DB/DataObject.php';
require_once 'Validate.php';
-class User extends DB_DataObject
+class User extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
@@ -32,7 +32,7 @@ class User extends DB_DataObject
public $__table = 'user'; // table name
public $id; // int(4) primary_key not_null
public $nickname; // varchar(64) unique_key
- public $password; // varchar(255)
+ public $password; // varchar(255)
public $email; // varchar(255) unique_key
public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@@ -42,7 +42,7 @@ class User extends DB_DataObject
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
-
+
function getProfile() {
$profile = DB_DataObject::factory('profile');
$profile->id = $this->id;
@@ -52,7 +52,7 @@ class User extends DB_DataObject
}
return NULL;
}
-
+
function isSubscribed($other) {
assert(!is_null($other));
$sub = DB_DataObject::factory('subscription');
@@ -60,11 +60,11 @@ class User extends DB_DataObject
$sub->subscribed = $other->id;
return $sub->find();
}
-
+
function validateEmail() {
return Validate::email($this->email, true);
}
-
+
function validateNickname() {
return Validate::string($this->nickname, array('min_length' => 1, 'max_length' => 64,
'format' => VALIDATE_ALPHA_LOWER . VALIDATE_NUM));