Zen Cart Logo
Forums / Upgrading to 1.5.x / Can not edit your admin user profiles (v1.5.0)?

Can not edit your admin user profiles (v1.5.0)?

Views: 1,254

Results 1 to 2 of 2
13 Feb 2012, 1:48 AM
#1
jing_guo avatar

jing_guo

New Zenner

Join Date:
Jun 2010
Posts:
4
Plugin Contributions:
0

Can not edit your admin user profiles (v1.5.0)?

After I install Zen-Cart V1.5.0, I found that I can not edit the admin user profiles after "add profiles".

I try to find the answer at this forum, but find nothing :oops:

Here is how I solve the problem:

edit file" admin folder\profiles.php"

line:199

<form id="profileBoxes" name="profileBoxes" action="<?php echo zen_href_link(FILENAME_PROFILES) ?>" method="post">

change to

<?php echo zen_draw_form('profileBoxes', FILENAME_PROFILES, 'action=edit') ?>

:clap: I think this post may be able to help some others.

13 Feb 2012, 2:10 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can not edit your admin user profiles (v1.5.0)?

Actually this has already been posted as a bug report previously.

And the correct fix to the /admin/profiles.php is ...

to change:

<form id="profileBoxes" name="profileBoxes" action="<?php echo zen_href_link(FILENAME_PROFILES) ?>" method="post">

to read:

  <?php echo zen_draw_form('profileBoxes', FILENAME_PROFILES, 'action=insert') ?>

One other change is to fix:

  case 'update_name':
    zen_update_profile_name($profile, $_POST['profile-name']);
    $messageStack->add_session(SUCCESS_PROFILE_NAME_UPDATED, 'success');
    zen_redirect(zen_href_link(FILENAME_PROFILES));
    break;

and change to:

  case 'update_name':
  // bof: fix update name
    if (trim($_POST['profile-name']) == '') {
      $messageStack->add_session(ERROR_INVALID_PROFILE_NAME, 'error');
      zen_redirect(zen_href_link(FILENAME_PROFILES));
    }
  // eof: fix update name
    zen_update_profile_name($profile, $_POST['profile-name']);
    $messageStack->add_session(SUCCESS_PROFILE_NAME_UPDATED, 'success');
    zen_redirect(zen_href_link(FILENAME_PROFILES));
    break;