Forums / Setup & design / /user/edit doesn't work

/user/edit doesn't work

Author Message

Willie Seabrook

Sunday 31 August 2003 9:31:22 pm

Hi,

I have modified all the user login/register bits etc but i want to allow my users to edit their information easily. However, going to user/edit simply returns an error:

"Unavailable:
Content unavailable"

What is the story with this? How can I allow my users to edit their details but nothing else?

Regards,
Willie

Paul Forsyth

Monday 01 September 2003 12:22:51 am

I have problems editing the user that way. It is the best way, programmatically. The code seems to fail when it checks whether the user can be edited when given the correct user id (user/edit/80, for example).

I get better results by editing the content object directly, as a user is simply a content object. This code gives you an idea how to do this from a form in a template. Sometimes the variable $current_user is set in your current namespace. If not you can fetch it as I have shown. Note, you can test this just by typing a url directly into your browser... :)

{let current_user=fetch('user','current_user')}

<form name="MyForm" method="post" action="{concat('/content/edit/', $current_user.contentobject_id,'/')}">

<input type="submit" name="NewButton" value="Edit user"/>

</form>

Paul

Paul Forsyth

Monday 01 September 2003 12:26:41 am

Note, you need to make sure your user role is able to self edit their own details for this to work. Also, 3.2 has some bug fixes in it to make this work...

Paul

Willie Seabrook

Tuesday 02 September 2003 2:34:31 pm

Do you mean that 3.2 has some fixes in it to make *your* code work or to make the *user/edit* code work?

3.2 Is quite useless to me at the moment because the 3.1 to 3.2 database upgrade sql doesn't work - hence I'm stuck on 3.1.

Regards,
Willie

Paul Forsyth

Wednesday 03 September 2003 12:19:02 am

We saw a comment in svn commit logs a while ago about something in 3.2 that helps to fix this but to be honest im not 100% sure. I just know it seems to work... but we haven't heavily tested yet.

This thread speaks about what we did for 3.1 to get it all to work. There is a small patch in there you can apply.

http://ez.no/developer/ez_publish_3/forum/developer/allowing_users_to_edit_their_own_details_with_selfedit_how_does_it_work

Paul

eZ debug

Timing: Jan 18 2025 19:27:11
Script start
Timing: Jan 18 2025 19:27:11
Module start 'content'
Timing: Jan 18 2025 19:27:11
Module end 'content'
Timing: Jan 18 2025 19:27:11
Script end

Main resources:

Total runtime0.1267 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 588.8359180.8438
Module start 'content' 0.00620.0053 769.679797.7422
Module end 'content' 0.01140.1152 867.4219526.2500
Script end 0.1267  1,393.6719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00332.6085200.0002
Check MTime0.00131.0472200.0001
Mysql Total
Database connection0.00110.845110.0011
Mysqli_queries0.085567.42911410.0006
Looping result0.00110.86791390.0000
Template Total0.114990.710.1149
Template load0.00080.663610.0008
Template processing0.114190.019410.1141
Override
Cache load0.00060.479010.0006
Sytem overhead
Fetch class attribute can translate value0.00060.441010.0006
XML
Image XML parsing0.00020.159410.0002
General
dbfile0.00302.3952200.0002
String conversion0.00000.004130.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs