Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezusertype.php
Go to the documentation of this file.
1 <?php
18 class eZUserType extends eZDataType
19 {
20 const DATA_TYPE_STRING = "ezuser";
21
22 public function __construct()
23 {
24 parent::__construct( self::DATA_TYPE_STRING, ezpI18n::tr( 'kernel/classes/datatypes', "User account", 'Datatype name' ),
25 array( 'translation_allowed' => false,
26 'serialize_supported' => true ) );
27 }
28
32 function deleteStoredObjectAttribute( $contentObjectAttribute, $version = null )
33 {
34 $db = eZDB::instance();
35 $userID = $contentObjectAttribute->attribute( "contentobject_id" );
36
37 $res = $db->arrayQuery( "SELECT COUNT(*) AS version_count FROM ezcontentobject_version WHERE contentobject_id = $userID" );
38 $versionCount = $res[0]['version_count'];
39
40 if ( ( $version == null || $versionCount <= 1 )
41 && eZUser::fetch( $userID ) !== null )
42 {
43 eZUser::removeUser( $userID );
44 $db->query( "DELETE FROM ezuser_role WHERE contentobject_id = '$userID'" );
45 }
46 }
47
52 function validateObjectAttributeHTTPInput( $http, $base, $contentObjectAttribute )
53 {
54 if ( $http->hasPostVariable( $base . "_data_user_login_" . $contentObjectAttribute->attribute( "id" ) ) &&
55 $http->hasPostVariable( $base . "_data_user_email_" . $contentObjectAttribute->attribute( "id" ) ) &&
56 $http->hasPostVariable( $base . "_data_user_password_" . $contentObjectAttribute->attribute( "id" ) ) &&
57 $http->hasPostVariable( $base . "_data_user_password_confirm_" . $contentObjectAttribute->attribute( "id" ) ) )
58 {
59 $classAttribute = $contentObjectAttribute->contentClassAttribute();
60 $loginName = strip_tags( $http->postVariable( $base . "_data_user_login_" . $contentObjectAttribute->attribute( "id" ) ) );
61 $email = $http->postVariable( $base . "_data_user_email_" . $contentObjectAttribute->attribute( "id" ) );
62 $password = $http->postVariable( $base . "_data_user_password_" . $contentObjectAttribute->attribute( "id" ) );
63 $passwordConfirm = $http->postVariable( $base . "_data_user_password_confirm_" . $contentObjectAttribute->attribute( "id" ) );
64 if ( trim( $loginName ) == '' )
65 {
66 if ( $contentObjectAttribute->validateIsRequired() || trim( $email ) != '' )
67 {
68 $contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes',
69 'The username must be specified.' ) );
70 return eZInputValidator::STATE_INVALID;
71 }
72 }
73 else
74 {
75 $existUser = eZUser::fetchByName( $loginName );
76 if ( $existUser != null )
77 {
78 $userID = $existUser->attribute( 'contentobject_id' );
79 if ( $userID != $contentObjectAttribute->attribute( "contentobject_id" ) )
80 {
81 $contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes',
82 'The username already exists, please choose another one.' ) );
83 return eZInputValidator::STATE_INVALID;
84 }
85 }
86 // validate user email
87 $isValidate = eZMail::validate( $email );
88 if ( !$isValidate )
89 {
90 $contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes',
91 'The email address is not valid.' ) );
92 return eZInputValidator::STATE_INVALID;
93 }
94
95 $authenticationMatch = eZUser::authenticationMatch();
96 if ( $authenticationMatch & eZUser::AUTHENTICATE_EMAIL )
97 {
98 if ( eZUser::requireUniqueEmail() )
99 {
100 $userByEmail = eZUser::fetchByEmail( $email );
101 if ( $userByEmail != null )
102 {
103 $userID = $userByEmail->attribute( 'contentobject_id' );
104 if ( $userID != $contentObjectAttribute->attribute( "contentobject_id" ) )
105 {
106 $contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes',
107 'A user with this email already exists.' ) );
108 return eZInputValidator::STATE_INVALID;
109 }
110 }
111 }
112 }
113 // validate user name
114 if ( !eZUser::validateLoginName( $loginName, $errorText ) )
115 {
116 $contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes',
117 $errorText ) );
118 return eZInputValidator::STATE_INVALID;
119 }
120 // validate user password
121 $ini = eZINI::instance();
122 $generatePasswordIfEmpty = $ini->variable( "UserSettings", "GeneratePasswordIfEmpty" ) == 'true';
123 if ( !$generatePasswordIfEmpty || ( $password != "" ) )
124 {
125 if ( $password == "" )
126 {
127 $contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes',
128 'The password cannot be empty.',
129 'eZUserType' ) );
130 return eZInputValidator::STATE_INVALID;
131 }
132 if ( $password !== $passwordConfirm )
133 {
134 $contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes',
135 'The passwords do not match.',
136 'eZUserType' ) );
137 return eZInputValidator::STATE_INVALID;
138 }
139 if ( !eZUser::validatePassword( $password ) )
140 {
141 $minPasswordLength = $ini->variable( 'UserSettings', 'MinPasswordLength' );
142 $contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes',
143 'The password must be at least %1 characters long.', null, array( $minPasswordLength ) ) );
144 return eZInputValidator::STATE_INVALID;
145 }
146 if ( strtolower( $password ) == 'password' )
147 {
148 $contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes',
149 'The password must not be "password".' ) );
150 return eZInputValidator::STATE_INVALID;
151 }
152 }
153
154 // validate confirm email
155 if ( $ini->variable( 'UserSettings', 'RequireConfirmEmail' ) == 'true' )
156 {
157 $emailConfirm = $http->postVariable( $base . "_data_user_email_confirm_" . $contentObjectAttribute->attribute( "id" ) );
158 if ( $email != $emailConfirm )
159 {
160 $contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes',
161 'The emails do not match.',
162 'eZUserType' ) );
163 return eZInputValidator::STATE_INVALID;
164 }
165 }
166 }
167 }
168 else if ( $contentObjectAttribute->validateIsRequired() )
169 {
170 $contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes', 'Input required.' ) );
171 return eZInputValidator::STATE_INVALID;
172 }
173 return eZInputValidator::STATE_ACCEPTED;
174 }
175
179 function fetchObjectAttributeHTTPInput( $http, $base, $contentObjectAttribute )
180 {
181 if ( $http->hasPostVariable( $base . "_data_user_login_" . $contentObjectAttribute->attribute( "id" ) ) )
182 {
183 $login = strip_tags( $http->postVariable( $base . "_data_user_login_" . $contentObjectAttribute->attribute( "id" ) ) );
184 $email = $http->hasPostVariable( $base . "_data_user_email_" . $contentObjectAttribute->attribute( "id" ) ) ? $http->postVariable( $base . "_data_user_email_" . $contentObjectAttribute->attribute( "id" ) ) : '';
185 $password = $http->hasPostVariable( $base . "_data_user_password_" . $contentObjectAttribute->attribute( "id" ) ) ? $http->postVariable( $base . "_data_user_password_" . $contentObjectAttribute->attribute( "id" ) ) : '';
186 $passwordConfirm = $http->hasPostVariable( $base . "_data_user_password_confirm_" . $contentObjectAttribute->attribute( "id" ) ) ? $http->postVariable( $base . "_data_user_password_confirm_" . $contentObjectAttribute->attribute( "id" ) ) : '';
187
188 $contentObjectID = $contentObjectAttribute->attribute( "contentobject_id" );
189
190 $user = $contentObjectAttribute->content();
191 if ( $user === null )
192 {
193 $user = eZUser::create( $contentObjectID );
194 }
195
196 $ini = eZINI::instance();
197 $generatePasswordIfEmpty = $ini->variable( "UserSettings", "GeneratePasswordIfEmpty" );
198 if ( $password == "" )
199 {
200 if ( $generatePasswordIfEmpty == 'true' )
201 {
202 $passwordLength = $ini->variable( "UserSettings", "GeneratePasswordLength" );
203 $password = $user->createPassword( $passwordLength );
204 $passwordConfirm = $password;
205 $http->setSessionVariable( "GeneratedPassword", $password );
206 }
207 else
208 {
209 $password = null;
210 }
211 }
212
213 eZDebugSetting::writeDebug( 'kernel-user', $password, "password" );
214 eZDebugSetting::writeDebug( 'kernel-user', $passwordConfirm, "passwordConfirm" );
215 eZDebugSetting::writeDebug( 'kernel-user', $login, "login" );
216 eZDebugSetting::writeDebug( 'kernel-user', $email, "email" );
217 eZDebugSetting::writeDebug( 'kernel-user', $contentObjectID, "contentObjectID" );
218 if ( $password == "_ezpassword" )
219 {
220 $password = false;
221 $passwordConfirm = false;
222 }
223 else
224 $http->setSessionVariable( "GeneratedPassword", $password );
225
226 eZDebugSetting::writeDebug( 'kernel-user', "setInformation run", "ezusertype" );
227 $user->setInformation( $contentObjectID, $login, $email, $password, $passwordConfirm );
228 $contentObjectAttribute->setContent( $user );
229 return true;
230 }
231 return false;
232 }
233
234 function storeObjectAttribute( $contentObjectAttribute )
235 {
238 $user = $contentObjectAttribute->content();
239 if ( !( $user instanceof eZUser ) )
240 {
241 // create a default user account
242 $user = eZUser::create( $contentObjectAttribute->attribute( "contentobject_id" ) );
243 $userID = $contentObjectAttribute->attribute( "contentobject_id" );
244 $isEnabled = 1;
245 $userSetting = eZUserSetting::create( $userID, $isEnabled );
246 $userSetting->store();
247
248 $user->store();
249 $contentObjectAttribute->setContent( $user );
250 }
251 else
252 {
253 // No "draft" for version 1 to avoid regression for existing code creating new users.
254 if ( $contentObjectAttribute->attribute( 'version' ) == '1' )
255 {
256 $user->store();
257 $contentObjectAttribute->setContent( $user );
258 }
259
260 // saving information in the object attribute data_text field to simulate a draft
261 // only if the object version is a draft
262 if (
263 $user->Login &&
264 $contentObjectAttribute->attribute( 'object_version' )->attribute( 'status' ) == eZContentObjectVersion::STATUS_DRAFT
265 )
266 {
267 $contentObjectAttribute->setAttribute( 'data_text', $this->serializeDraft( $user ) );
268 }
269 }
270 }
271
277 function onPublish( $contentObjectAttribute, $contentObject, $publishedNodes )
278 {
281 $user = $contentObjectAttribute->content();
282
283 // Publishing draft's content
284 $serializedDraft = $contentObjectAttribute->attribute( 'data_text' );
285
286 if ( !empty( $serializedDraft ) )
287 {
288 $user = $this->updateUserDraft( $user, $serializedDraft );
289 $user->store();
290 $contentObjectAttribute->setContent( $user );
291
292 // Clear draft info
293 $contentObjectAttribute->setAttribute( 'data_text', '' );
294 $contentObjectAttribute->store();
295 }
296 }
297
304 public static function serializeDraft( eZUser $user )
305 {
306 return json_encode(
307 array(
308 'login' => $user->attribute( 'login' ),
309 'password_hash' => $user->attribute( 'password_hash' ),
310 'email' => $user->attribute( 'email' ),
311 'password_hash_type' => $user->attribute( 'password_hash_type' )
312 )
313 );
314 }
315
322 private function unserializeDraft( $serializedDraft )
323 {
324 return json_decode( $serializedDraft );
325 }
326
334 private function updateUserDraft( eZUser $user, $serializedDraft )
335 {
336 $draft = $this->unserializeDraft( $serializedDraft );
337
338 if ( $draft )
339 {
340 $user->setAttribute( 'login', $draft->login );
341 $user->setAttribute( 'password_hash', $draft->password_hash );
342 $user->setAttribute( 'email', $draft->email );
343 $user->setAttribute( 'password_hash_type', $draft->password_hash_type );
344 }
345
346 return $user;
347 }
348
352 function title( $contentObjectAttribute, $name = "login" )
353 {
354 $user = $this->objectAttributeContent( $contentObjectAttribute );
355
356 $value = $user->attribute( $name );
357
358 return $value;
359 }
360
361 function hasObjectAttributeContent( $contentObjectAttribute )
362 {
363 $user = $this->objectAttributeContent( $contentObjectAttribute );
364 if ( is_object( $user ) and
365 $user->isEnabled() )
366 return true;
367 return false;
368 }
369
373 function objectAttributeContent( $contentObjectAttribute )
374 {
375 $userID = $contentObjectAttribute->attribute( "contentobject_id" );
376 if ( empty( $GLOBALS['eZUserObject_' . $userID] ) )
377 {
378 $GLOBALS['eZUserObject_' . $userID] = eZUser::fetch( $userID );
379 }
380
381 $user = eZUser::fetch( $userID );
382 eZDebugSetting::writeDebug( 'kernel-user', $user, 'user' );
383
384 //Looking for a "draft" and loading its content
385 $serializedDraft = $contentObjectAttribute->attribute( 'data_text' );
386
387 if ( !empty( $serializedDraft ) )
388 {
389 $user = $this->updateUserDraft( $user, $serializedDraft );
390 }
391
392 return $user;
393 }
394
395 function isIndexable()
396 {
397 return true;
398 }
399
405 function classAttributeRemovableInformation( $contentClassAttribute, $includeAll = true )
406 {
407 $result = array( 'text' => ezpI18n::tr( 'kernel/classes/datatypes',
408 "Cannot remove the account:" ),
409 'list' => array() );
410 $currentUser = eZUser::currentUser();
411 $userObject = $currentUser->attribute( 'contentobject' );
412 $ini = eZINI::instance();
413 $anonID = (int)$ini->variable( 'UserSettings', 'AnonymousUserID' );
414 $classID = (int)$contentClassAttribute->attribute( 'contentclass_id' );
415 $db = eZDB::instance();
416
417 if ( $classID == $userObject->attribute( 'contentclass_id' ) )
418 {
419 $result['list'][] = array( 'text' => ezpI18n::tr( 'kernel/classes/datatypes',
420 "The account owner is currently logged in." ) );
421 if ( !$includeAll )
422 return $result;
423 }
424
425 $sql = "SELECT id FROM ezcontentobject WHERE id = $anonID AND contentclass_id = $classID";
426 $rows = $db->arrayQuery( $sql );
427 if ( count( $rows ) > 0 )
428 {
429 $result['list'][] = array( 'text' => ezpI18n::tr( 'kernel/classes/datatypes',
430 "The account is currently used by the anonymous user." ) );
431 if ( !$includeAll )
432 return $result;
433 }
434
435 $sql = "SELECT ezco.id FROM ezcontentobject ezco, ezuser
436 WHERE ezco.contentclass_id = $classID AND
437 ezuser.login = 'admin' AND
438 ezco.id = ezuser.contentobject_id ";
439 $rows = $db->arrayQuery( $sql );
440 if ( count( $rows ) > 0 )
441 {
442 $result['list'][] = array( 'text' => ezpI18n::tr( 'kernel/classes/datatypes',
443 "The account is currently used the administrator user." ) );
444 if ( !$includeAll )
445 return $result;
446 }
447
448 $sql = "SELECT count( ezcc.id ) AS count FROM ezcontentclass ezcc, ezcontentclass_attribute ezcca
449 WHERE ezcc.id != $classID AND
450 ezcca.data_type_string = 'ezuser' AND
451 ezcc.id = ezcca.contentclass_id ";
452 $rows = $db->arrayQuery( $sql );
453 if ( $rows[0]['count'] == 0 )
454 {
455 $result['list'][] = array( 'text' => ezpI18n::tr( 'kernel/classes/datatypes',
456 "You cannot remove the last class holding user accounts." ) );
457 if ( !$includeAll )
458 return $result;
459 }
460
461 return $result;
462 }
463
467 function metaData( $contentObjectAttribute )
468 {
469 $metaString = "";
470 $user = $contentObjectAttribute->content();
471
472 if ( $user instanceof eZUser )
473 {
474 // create a default user account
475 $metaString .= $user->attribute( 'login' ) . " ";
476 $metaString .= $user->attribute( 'email' ) . " ";
477 }
478 return $metaString;
479 }
480
511 function toString( $contentObjectAttribute )
512 {
513 $userID = $contentObjectAttribute->attribute( "contentobject_id" );
514 if ( empty( $GLOBALS['eZUserObject_' . $userID] ) )
515 {
516 $GLOBALS['eZUserObject_' . $userID] = eZUser::fetch( $userID );
517 }
518 $user = $GLOBALS['eZUserObject_' . $userID];
519
520 $userInfo = array(
521 $user->attribute( 'login' ),
522 $user->attribute( 'email' ),
523 $user->attribute( 'password_hash' ),
524 eZUser::passwordHashTypeName( $user->attribute( 'password_hash_type' ) ),
525 (int)$user->isEnabled()
526 );
527
528 return implode( '|', $userInfo );
529 }
530
547 function fromString( $contentObjectAttribute, $string )
548 {
549 if ( $string == '' )
550 return true;
551 $userData = explode( '|', $string );
552 if( count( $userData ) < 2 )
553 return false;
554 $login = $userData[0];
555 $email = $userData[1];
556
557 $userByUsername = eZUser::fetchByName( $login );
558 if( $userByUsername && $userByUsername->attribute( 'contentobject_id' ) != $contentObjectAttribute->attribute( 'contentobject_id' ) )
559 return false;
560
561 if( eZUser::requireUniqueEmail() )
562 {
563 $userByEmail = eZUser::fetchByEmail( $email );
564 if( $userByEmail && $userByEmail->attribute( 'contentobject_id' ) != $contentObjectAttribute->attribute( 'contentobject_id' ) )
565 return false;
566 }
567
568 $user = eZUser::create( $contentObjectAttribute->attribute( 'contentobject_id' ) );
569
570 $user->setAttribute( 'login', $login );
571 $user->setAttribute( 'email', $email );
572 if ( isset( $userData[2] ) )
573 $user->setAttribute( 'password_hash', $userData[2] );
574
575 if ( isset( $userData[3] ) )
576 $user->setAttribute( 'password_hash_type', eZUser::passwordHashTypeID( $userData[3] ) );
577
578 if( isset( $userData[4] ) )
579 {
580 $userSetting = eZUserSetting::fetch(
581 $contentObjectAttribute->attribute( 'contentobject_id' )
582 );
583 $userSetting->setAttribute( "is_enabled", (int)(bool)$userData[4] );
584 $userSetting->store();
585 }
586
587 $user->store();
588 return $user;
589 }
590
597 function serializeContentObjectAttribute( $package, $objectAttribute )
598 {
599 $node = $this->createContentObjectAttributeDOMNode( $objectAttribute );
600 $userID = $objectAttribute->attribute( "contentobject_id" );
601 $user = eZUser::fetch( $userID );
602 if ( is_object( $user ) )
603 {
604 $userNode = $node->ownerDocument->createElement( 'account' );
605 $userNode->setAttribute( 'login', $user->attribute( 'login' ) );
606 $userNode->setAttribute( 'email', $user->attribute( 'email' ) );
607 $userNode->setAttribute( 'password_hash', $user->attribute( 'password_hash' ) );
608 $userNode->setAttribute( 'password_hash_type', eZUser::passwordHashTypeName( $user->attribute( 'password_hash_type' ) ) );
609 $userNode->setAttribute( 'is_enabled', (int)$user->isEnabled() );
610 $node->appendChild( $userNode );
611 }
612
613 return $node;
614 }
615
621 function unserializeContentObjectAttribute( $package, $objectAttribute, $attributeNode )
622 {
623 $userNode = $attributeNode->getElementsByTagName( 'account' )->item( 0 );
624 if ( is_object( $userNode ) )
625 {
626 $userID = $objectAttribute->attribute( 'contentobject_id' );
627 $user = eZUser::fetch( $userID );
628 if ( !is_object( $user ) )
629 {
630 $user = eZUser::create( $userID );
631 }
632 $user->setAttribute( 'login', $userNode->getAttribute( 'login' ) );
633 $user->setAttribute( 'email', $userNode->getAttribute( 'email' ) );
634 $user->setAttribute( 'password_hash', $userNode->getAttribute( 'password_hash' ) );
635 $user->setAttribute( 'password_hash_type', eZUser::passwordHashTypeID( $userNode->getAttribute( 'password_hash_type' ) ) );
636 $user->store();
637 }
638 }
639 }
640
641 eZDataType::register( eZUserType::DATA_TYPE_STRING, "eZUserType" );
642
643 ?>
eZContentObjectVersion\STATUS_DRAFT
const STATUS_DRAFT
Definition: ezcontentobjectversion.php:29
eZDB\instance
static instance( $databaseImplementation=false, $databaseParameters=false, $forceNewInstance=false)
Definition: ezdb.php:117
eZDataType
Base class for content datatypes.
Definition: ezdatatype.php:46
eZDataType\register
static register( $dataTypeString, $className)
Definition: ezdatatype.php:203
eZDataType\storeObjectAttribute
storeObjectAttribute( $objectAttribute)
Definition: ezdatatype.php:632
eZDataType\onPublish
onPublish( $contentObjectAttribute, $contentObject, $publishedNodes)
Definition: ezdatatype.php:646
eZDataType\createContentObjectAttributeDOMNode
createContentObjectAttributeDOMNode( $objectAttribute)
Definition: ezdatatype.php:1371
eZDebugSetting\writeDebug
static writeDebug( $conditionName, $string, $label="")
Definition: ezdebugsetting.php:127
eZInputValidator\STATE_ACCEPTED
const STATE_ACCEPTED
Definition: ezinputvalidator.php:79
eZInputValidator\STATE_INVALID
const STATE_INVALID
Definition: ezinputvalidator.php:81
eZMail\validate
static validate( $address)
Definition: ezmail.php:747
eZPersistentObject\setAttribute
setAttribute( $attr, $val)
Definition: ezpersistentobject.php:1374
eZPersistentObject\attribute
attribute( $attr, $noFunction=false)
Definition: ezpersistentobject.php:1329
eZUserSetting\fetch
static fetch( $userID, $asObject=true)
Definition: ezusersetting.php:77
eZUserSetting\create
static create( $userID, $isEnabled)
Definition: ezusersetting.php:44
eZUserType
The class eZUserType handles user accounts and association with content objects.
Definition: ezusertype.php:19
eZUserType\deleteStoredObjectAttribute
deleteStoredObjectAttribute( $contentObjectAttribute, $version=null)
Definition: ezusertype.php:32
eZUserType\hasObjectAttributeContent
hasObjectAttributeContent( $contentObjectAttribute)
Definition: ezusertype.php:361
eZUserType\toString
toString( $contentObjectAttribute)
Definition: ezusertype.php:511
eZUserType\__construct
__construct()
Definition: ezusertype.php:22
eZUserType\isIndexable
isIndexable()
Definition: ezusertype.php:395
eZUserType\classAttributeRemovableInformation
classAttributeRemovableInformation( $contentClassAttribute, $includeAll=true)
Definition: ezusertype.php:405
eZUserType\validateObjectAttributeHTTPInput
validateObjectAttributeHTTPInput( $http, $base, $contentObjectAttribute)
Definition: ezusertype.php:52
eZUserType\fromString
fromString( $contentObjectAttribute, $string)
Definition: ezusertype.php:547
eZUserType\serializeDraft
static serializeDraft(eZUser $user)
Definition: ezusertype.php:304
eZUserType\objectAttributeContent
objectAttributeContent( $contentObjectAttribute)
Definition: ezusertype.php:373
eZUserType\updateUserDraft
updateUserDraft(eZUser $user, $serializedDraft)
Definition: ezusertype.php:334
eZUserType\fetchObjectAttributeHTTPInput
fetchObjectAttributeHTTPInput( $http, $base, $contentObjectAttribute)
Definition: ezusertype.php:179
eZUserType\metaData
metaData( $contentObjectAttribute)
Definition: ezusertype.php:467
eZUserType\unserializeContentObjectAttribute
unserializeContentObjectAttribute( $package, $objectAttribute, $attributeNode)
Definition: ezusertype.php:621
eZUserType\DATA_TYPE_STRING
const DATA_TYPE_STRING
Definition: ezusertype.php:20
eZUserType\serializeContentObjectAttribute
serializeContentObjectAttribute( $package, $objectAttribute)
Definition: ezusertype.php:597
eZUserType\title
title( $contentObjectAttribute, $name="login")
Definition: ezusertype.php:352
eZUserType\unserializeDraft
unserializeDraft( $serializedDraft)
Definition: ezusertype.php:322
eZUser
eZUser handles eZ Publish user accounts
Definition: ezuser.php:19
eZUser\passwordHashTypeName
static passwordHashTypeName( $id)
Definition: ezuser.php:135
eZUser\authenticationMatch
static authenticationMatch()
Definition: ezuser.php:719
eZUser\requireUniqueEmail
static requireUniqueEmail()
Definition: ezuser.php:744
eZUser\fetchByName
static fetchByName( $login, $asObject=true)
Definition: ezuser.php:361
eZUser\create
static create( $contentObjectID)
Definition: ezuser.php:237
eZUser\fetch
static fetch( $id, $asObject=true)
Definition: ezuser.php:351
eZUser\fetchByEmail
static fetchByEmail( $email, $asObject=true)
Definition: ezuser.php:369
eZUser\passwordHashTypeID
static passwordHashTypeID( $identifier)
Definition: ezuser.php:177
eZUser\validateLoginName
static validateLoginName( $loginName, &$errorText)
Definition: ezuser.php:2873
eZUser\currentUser
static currentUser()
Definition: ezuser.php:1716
eZUser\validatePassword
static validatePassword( $password)
Definition: ezuser.php:2850
eZUser\AUTHENTICATE_EMAIL
const AUTHENTICATE_EMAIL
Authenticate by matching the email field.
Definition: ezuser.php:53
eZUser\removeUser
static removeUser( $userID)
Definition: ezuser.php:629
ezpI18n\tr
static tr( $context, $source, $comment=null, $arguments=null)
Definition: ezpi18n.php:86
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.