Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
FUSE update() doesn't work with R::graph
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Rikki  
View profile  
 More options Mar 29 2012, 5:32 am
From: Rikki <ri...@studiomohu.com>
Date: Thu, 29 Mar 2012 02:32:23 -0700 (PDT)
Local: Thurs, Mar 29 2012 5:32 am
Subject: FUSE update() doesn't work with R::graph
Hi guys,

I'm trying to use the FUSE update function to alter a password field
from plain text to md5.

When I call the public function update() in the correct model, it
doesn't seem to fire...

dispense, delete, open etc all work. update and after_update don't...

Any ideas?

I'm using the $_POST to R::graph to successfully store my beans, but
am now stumped!

Cheers for any help you may have.

Rikki


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rikki  
View profile  
 More options Apr 18 2012, 4:38 am
From: Rikki <ri...@studiomohu.com>
Date: Wed, 18 Apr 2012 01:38:23 -0700 (PDT)
Local: Wed, Apr 18 2012 4:38 am
Subject: Re: FUSE update() doesn't work with R::graph
I didn't realise this got set to published... Has anyone encountered
this issue?

Rikki

On Mar 29, 10:32 am, Rikki <ri...@studiomohu.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rikki  
View profile  
 More options Apr 19 2012, 6:49 am
From: Rikki <ri...@studiomohu.com>
Date: Thu, 19 Apr 2012 03:49:13 -0700 (PDT)
Local: Thurs, Apr 19 2012 6:49 am
Subject: Re: FUSE update() doesn't work with R::graph
Got it working. My class that was doing my update hadn't referred to
my model file.

The following function might help others... It's preg_matches sha1
passwords and only updates the password field if the password isn't a
sha1 encrypted string.

function after_update() {
    $sha1 = (bool) preg_match('/^[0-9a-f]{40}$/i', $this->password);
    if (!$sha1) {
      $user = R::load('users', $this->id);
      $user->password = sha1($this->password);
      R::store($user);
    }
  }

On Apr 18, 9:38 am, Rikki <ri...@studiomohu.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »