mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-11 09:49:05 +00:00
0055bd7c4e
--HG-- branch : gsoc2011-kerozcak
53 lines
1.2 KiB
PHP
53 lines
1.2 KiB
PHP
<?php
|
|
class User extends AppModel {
|
|
var $name = 'User';
|
|
var $displayField = 'name';
|
|
|
|
var $validate = array(
|
|
'username' => array(
|
|
'alphaNumeric',
|
|
/* 'uniqueCheck' => array(
|
|
'rule' => 'isUnique',
|
|
'message' => 'That username has already been taken.',
|
|
),*/
|
|
),
|
|
'email' => array('rule' => 'email', 'message' => 'Wrong format'),
|
|
'name' => array('rule' => 'notEmpty'),
|
|
// 'password' => array('rule' => 'notEmpty'),
|
|
'passwd' => array('rule' => 'notEmpty'),
|
|
);
|
|
|
|
var $scaffoldForbiddenActions = array("add", "edit", "delete");
|
|
|
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
|
|
|
var $hasMany = array(
|
|
'Translation' => array(
|
|
'className' => 'Translation',
|
|
'foreignKey' => 'user_id',
|
|
'dependent' => false,
|
|
'conditions' => '',
|
|
'fields' => '',
|
|
'order' => '',
|
|
'limit' => '',
|
|
'offset' => '',
|
|
'exclusive' => '',
|
|
'finderQuery' => '',
|
|
'counterQuery' => ''
|
|
),
|
|
'Vote' => array(
|
|
'className' => 'Vote',
|
|
'foreignKey' => 'user_id',
|
|
'dependent' => false,
|
|
'conditions' => '',
|
|
'fields' => '',
|
|
'order' => '',
|
|
'limit' => '',
|
|
'offset' => '',
|
|
'exclusive' => '',
|
|
'finderQuery' => '',
|
|
'counterQuery' => ''
|
|
)
|
|
);
|
|
|
|
}
|