Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezuseraccountkey.php
Go to the documentation of this file.
1 <?php
18 class eZUserAccountKey extends eZPersistentObject
19 {
20 static function definition()
21 {
22 return array( 'fields' => array( 'id' => array( 'name' => 'ID',
23 'datatype' => 'integer',
24 'default' => 0,
25 'required' => true ),
26 'user_id' => array( 'name' => 'UserID',
27 'datatype' => 'integer',
28 'default' => 0,
29 'required' => true,
30 'foreign_class' => 'eZUser',
31 'foreign_attribute' => 'contentobject_id',
32 'multiplicity' => '0..1' ),
33 'hash_key' => array( 'name' => 'HashKey',
34 'datatype' => 'string',
35 'default' => '',
36 'required' => true ),
37 'time' => array( 'name' => 'Time',
38 'datatype' => 'integer',
39 'default' => 0,
40 'required' => true )
41 ),
42 'keys' => array( 'id' ),
43 'increment_key' => 'id',
44 'sort' => array( 'id' => 'asc' ),
45 'class_name' => 'eZUserAccountKey',
46 'name' => 'ezuser_accountkey' );
47 }
48
49 static function createNew( $userID, $hashKey, $time)
50 {
51 return new eZUserAccountKey( array( 'user_id' => $userID,
52 'hash_key' => $hashKey,
53 'time' => $time ) );
54 }
55
56 static function fetchByKey( $hashKey )
57 {
58 return eZPersistentObject::fetchObject( eZUserAccountKey::definition(),
59 null,
60 array( 'hash_key' => $hashKey ),
61 true );
62 }
63
70 static public function fetchByUserID( $userID )
71 {
72 return eZPersistentObject::fetchObject(
73 eZUserAccountKey::definition(),
74 null,
75 array( 'user_id' => $userID ),
76 true
77 );
78 }
79
83 static function removeByUserID( $userID )
84 {
85 eZPersistentObject::removeObject( eZUserAccountKey::definition(),
86 array( 'user_id' => $userID ) );
87 }
88
89 }
90
91 ?>
eZPersistentObject
Definition: ezpersistentobject.php:33
eZPersistentObject\fetchObject
static fetchObject( $def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
Definition: ezpersistentobject.php:213
eZPersistentObject\removeObject
static removeObject( $def, $conditions=null, $extraConditions=null)
Definition: ezpersistentobject.php:271
eZUserAccountKey
The class eZUserAccountKey does.
Definition: ezuseraccountkey.php:19
eZUserAccountKey\createNew
static createNew( $userID, $hashKey, $time)
Definition: ezuseraccountkey.php:49
eZUserAccountKey\fetchByUserID
static fetchByUserID( $userID)
Definition: ezuseraccountkey.php:70
eZUserAccountKey\fetchByKey
static fetchByKey( $hashKey)
Definition: ezuseraccountkey.php:56
eZUserAccountKey\definition
static definition()
Definition: ezuseraccountkey.php:20
eZUserAccountKey\removeByUserID
static removeByUserID( $userID)
Definition: ezuseraccountkey.php:83
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.