Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezforgotpassword.php
Go to the documentation of this file.
1 <?php
18 class eZForgotPassword 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..*' ),
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 "keys" => array( "id" ),
42 "increment_key" => "id",
43 "sort" => array( "id" => "asc" ),
44 "class_name" => "eZForgotPassword",
45 "name" => "ezforgot_password" );
46 }
47
48 static function createNew( $userID, $hashKey, $time)
49 {
50 return new eZForgotPassword( array( "user_id" => $userID,
51 "hash_key" => $hashKey,
52 "time" => $time ) );
53 }
54
55 static function fetchByKey( $hashKey )
56 {
57 return eZPersistentObject::fetchObject( eZForgotPassword::definition(),
58 null,
59 array( "hash_key" => $hashKey ),
60 true );
61 }
62
67 static function cleanup()
68 {
69 $db = eZDB::instance();
70 $db->query( "DELETE FROM ezforgot_password" );
71 }
72
76 static function removeByUserID( $userID )
77 {
78 eZPersistentObject::removeObject( eZForgotPassword::definition(),
79 array( 'user_id' => $userID ) );
80 }
81 }
82
83 ?>
eZDB\instance
static instance( $databaseImplementation=false, $databaseParameters=false, $forceNewInstance=false)
Definition: ezdb.php:117
eZForgotPassword
The class eZForgotPassword does.
Definition: ezforgotpassword.php:19
eZForgotPassword\definition
static definition()
Definition: ezforgotpassword.php:20
eZForgotPassword\removeByUserID
static removeByUserID( $userID)
Definition: ezforgotpassword.php:76
eZForgotPassword\fetchByKey
static fetchByKey( $hashKey)
Definition: ezforgotpassword.php:55
eZForgotPassword\createNew
static createNew( $userID, $hashKey, $time)
Definition: ezforgotpassword.php:48
eZForgotPassword\cleanup
static cleanup()
Definition: ezforgotpassword.php:67
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
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.