Modules/Default/User/Model/User.php
\Conjoon_Modules_Default_User_Model_User
Table data gateway. Models the table <tt>users</tt>.
- Parent(s)
- \Conjoon_BeanContext_Decoratable < ?\Zend_Db_Table
- Author
- Thorsten Suckow-Homberg
- Category
- Model
- Uses
- \Conjoon_Db_Table
Properties

string
$_name= ''users''
The name of the table in the underlying datastore this class represents, without any prefix defined by Conjoon_Db_Table::setTablePrefix
'users'Details- Type
- string

string
$_primary= ''id''
The name of the column that denotes the primary key for this table
'id'Details- Type
- string

String
$_tblPrefix= '""'
""Details- Type
- String
- Inherited_from
- \Conjoon_Db_Table::$$_tblPrefix
Methods

__construct(
string | array $config
=
array(), \unknown_type $definition
=
null
)
:
void__construct() - For concrete implementation of Conjoon_Db_Table
Inherited from: \Conjoon_Db_Table::__construct()This constructor automatically prepends the prefix as defined using setTablePrefix() to this table's name.
| Name | Type | Description |
|---|---|---|
| $config | string | array | string can reference a Zend_Registry key for a db adapter OR it can refernece the name of a table |
| $definition | \unknown_type |

getUser(
integer $id
)
:
\Conjoon_UserLooks up the row with the primary key $id, fetches the data and creates a new instance of Conjoon_User out of it or returns the data as fetched from the table.
| Name | Type | Description |
|---|---|---|
| $id | integer |
| Type | Description |
|---|---|
| \Conjoon_User | or null if no data with the primary key $id exists. |
| Exception | Description |
|---|---|
| \Conjoon_BeanContext_Exception | The method will throw an exception of the type Conjoon_BeanContext_Exception if the BeanContext-object Conjoon_User could not be created automatically. |

getUserForUserNameCredentials(
string $userName, string $password
)
:
\Zend_Db_Table_RowReturs the row that matches both the username and the password.
| Name | Type | Description |
|---|---|---|
| $userName | string | |
| $password | string |
| Type | Description |
|---|---|
| \Zend_Db_Table_Row |

getUserNameCount(
string $userName
)
:
integerReturns the number of users that share the same username, in case the index on the user_name field is missing.
| Name | Type | Description |
|---|---|---|
| $userName | string |
| Type | Description |
|---|---|
| integer |