Help: Admin is not allowed

Author Message

lin vin

Thursday 20 May 2004 6:48:52 pm

Hello all:
I have met a intractable problem. This happened when I trid to login the "user/fogetpassword" after I have logon with "admin". However I canceled to email. Then the problem appeared: I cant login using "admin", while i can login with other IDs.
I looked into the code "kernel/classed/datatypes/ezuser/ezuer.php", and found that it coundn't get any user with the name of "admin". I found that the status of user "admin" in the database of "ezcontentobject" have changed to "2", so i changed it to "1". Then it can return an ezuser of "admin".
However, I cant login using "admin" either.Then I debug, and it prints
"Warning: eZCodePage May 21 2004 09:50:48
Couldn't load codepage file share/codepages/utf-8
"
I can login with other IDs, but when i login with "admin", none of the pages is allowed.It just like the "admin" is uneable, but "enable" of the table "ezuser_setting" is "1". I think that the database has changed when i click "user/forgetpassword".However, I have no idea how to solve it.
I hope i can get the way from here. Thanks

Dominik Pich

Friday 21 May 2004 1:31:13 am

        $user =& eZUser::fetch( $forgotPasswdObj->attribute( 'user_id' ) );
        $email = $user->attribute( 'email' );

        $ini =& eZINI::instance();
        $passwordLength = $ini->variable( "UserSettings", "GeneratePasswordLength" );
        $password = eZUser::createPassword( $passwordLength );
        $passwordConfirm = $password;

        $userToSendEmail =& $user;
        $user->setInformation( $user->id(), $user->attribute( 'login' ), $email, $password, $passwordConfirm );
        $user->store();

It changed the password of the admin - set a new one you know

lin vin

Saturday 22 May 2004 9:01:11 am

Thank you for your reply!
But when i fetch the ezuser by id as following:

$user =& eZUser::fetch( 14 );//14 is the id of admin

I cant fetch any user.

lin vin

Saturday 22 May 2004 9:37:11 am

I got it!!
The db is not connected.I add the codes:

$db =& eZDB::instance();
$db->connect("localhost",$the_database,"root","");

However,it cant get any user, because the $connection in "lib/classes/ezdb/ezmysqldb.php" is false.Then i change the code:
$result =& mysql_query( $sql, $connection );
to
$result =& mysql_query( $sql);

Then i got it.
But I think it is not the best way.

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:31:46
Script start
Timing: Jan 18 2025 19:31:46
Module start 'layout'
Timing: Jan 18 2025 19:31:46
Module start 'content'
Timing: Jan 18 2025 19:31:47
Module end 'content'
Timing: Jan 18 2025 19:31:47
Script end

Main resources:

Total runtime0.6911 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 587.9141152.6250
Module start 'layout' 0.00730.0030 740.539139.4453
Module start 'content' 0.01030.6794 779.9844484.8203
Module end 'content' 0.68970.0014 1,264.804712.1641
Script end 0.6911  1,276.9688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.5124160.0002
Check MTime0.00130.1953160.0001
Mysql Total
Database connection0.00090.135710.0009
Mysqli_queries0.640192.6143600.0107
Looping result0.00060.0852580.0000
Template Total0.660395.520.3302
Template load0.00210.306320.0011
Template processing0.658295.233920.3291
Template load and register function0.00010.021310.0001
states
state_id_array0.00100.141710.0010
state_identifier_array0.00070.096020.0003
Override
Cache load0.00180.2565310.0001
Sytem overhead
Fetch class attribute can translate value0.00050.076120.0003
Fetch class attribute name0.00210.304540.0005
XML
Image XML parsing0.00020.034020.0001
class_abstraction
Instantiating content class attribute0.00000.001440.0000
General
dbfile0.00060.0927100.0001
String conversion0.00000.001140.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs