Users questions

Author Message

Carlos Revillo

Thursday 29 September 2005 4:41:07 am

Hi. I'm working with ez User Module. I want guest accounts can edit their profile. i gave read and edit access to a 'secret' section to guest accounts. Now i have to questions.
1.- Why users cannot change their passwords?. I think it's a problem with permissions, but i don't wich function i need.
2.- I want users can cancel their accounts by themselves. I don't know if there is a function for that or if i have to develope another one...
thanks a lot

Ɓukasz Serwatka

Thursday 29 September 2005 5:43:52 am

Hi Carlos,

Ad.1

Give your user access to /user/password/ view. Go to User accounts->Roles and policies edit you role and add new police:
Module: user
Function: password
Limitations: No limitations

Ad.2

You can make simple form, pass data to your module and disable user account or delete it.

This code example will disable user.

include_once( 'kernel/classes/datatypes/ezuser/ezuser.php' );

$user =& eZUser::currentuser();
$contentObjectID = $user->attribute('contentobject_id');
$isEnabled = 0;
$userSetting =& eZUserSetting::create( $contentObjectID, $isEnabled );
$userSetting->store();

I hope this will help you.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Carlos Revillo

Thursday 29 September 2005 10:23:07 am

thanks a lot. your first answer works perfect for me. but i have problems with second one. let's see. what i'm doing is exactly the same proccess as ez.no site.
you click 'my profile', then 'edit profile' and you get the update form. but what i'm trying to do is add a 'cancel account' button to this last form. Now the question is which action i have to assing to that button, or maybe, how do i redirect the form to that script you tell me before. thanks again. sorry for my english.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:23:32
Script start
Timing: Jan 18 2025 19:23:32
Module start 'layout'
Timing: Jan 18 2025 19:23:32
Module start 'content'
Timing: Jan 18 2025 19:23:33
Module end 'content'
Timing: Jan 18 2025 19:23:33
Script end

Main resources:

Total runtime0.9200 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 589.2109152.6094
Module start 'layout' 0.00510.0023 741.820339.3984
Module start 'content' 0.00750.9110 781.2188538.9297
Module end 'content' 0.91840.0015 1,320.148412.2031
Script end 0.9199  1,332.3516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3616160.0002
Check MTime0.00140.1502160.0001
Mysql Total
Database connection0.00080.087110.0008
Mysqli_queries0.871294.6934570.0153
Looping result0.00060.0622550.0000
Template Total0.879695.620.4398
Template load0.00220.236720.0011
Template processing0.877495.368920.4387
Template load and register function0.00020.017110.0002
states
state_id_array0.00170.182410.0017
state_identifier_array0.00200.219220.0010
Override
Cache load0.00180.1904230.0001
Sytem overhead
Fetch class attribute can translate value0.00070.074720.0003
Fetch class attribute name0.00080.090640.0002
XML
Image XML parsing0.00070.077920.0004
class_abstraction
Instantiating content class attribute0.00000.001140.0000
General
dbfile0.00080.0896180.0000
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs