developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 12 years ago

Closed 12 years ago

#766 closed bug (fixed)

jAuth: updateUser, fix a trivial bug and simplify

Reported by: bibo Owned by: bibo
Priority: high Milestone: jelix 1.1
Component: jelix:auth Version: trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

In jAuth::updateUser, $login should be $user->login.

Also, is this really needed to call again self::getUser as $user argument shall be a result of jAuth::getUser...

I assume no in this patch, but I'm not 100% sure, your thoughts ?

Attachments (1)

#766-trunk-updateUser.patch (1.2 KB) - added by bibo 12 years ago.
one-liner

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by bibo

one-liner

comment:1 Changed 12 years ago by laurentj

  • Component changed from jelix to jelix:auth
  • review set to review+

yes.

comment:2 Changed 12 years ago by bibo

  • Owner set to bibo
  • Status changed from new to assigned

comment:3 Changed 12 years ago by bibo

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:4 Changed 12 years ago by Julien

  • Resolution fixed deleted
  • review changed from review+ to review?
  • Status changed from closed to reopened

Hello, i'm not ok with that.

Example

  • I use a DAO backend for auth. I have a field named "update_time", with updatepattern="NOW()".
  • When changing the email address, I use jAuth::updateUser()
  • In my session, I want the updated value for $user->update_time

So we really need to call:

$_SESSION[$config['session_name']] = self::getUser($user->login);

comment:5 Changed 12 years ago by bibo

as laurent, I think jDao should update its record argument if it has updatePattern in its definition.

comment:6 Changed 12 years ago by Julien

  • Resolution set to fixed
  • review changed from review? to review+
  • Status changed from reopened to closed

Ok it's a jDao missing feature. Will add a ticket

Note: See TracTickets for help on using tickets.