src/Stevemo/Cpanel/User/Form/UserForm.php
public function update(array $data)
    {
        try
        {
            if ( $this->validator->with($data)->validForUpdate() )
            {
                $this->users->update($data['id'], $this->validator->getData());
                return true;
            }
        }
        catch (LoginRequiredException $e)
        {
            $this->validator->add('LoginRequiredException',$e->getMessage());
        }
        catch (PasswordRequiredException $e)
        {
            $this->validator->add('PasswordRequiredException',$e->getMessage());
        }
        catch (UserExistsException $e)
        {
            $this->validator->add('UserExistsException',$e->getMessage());
        }

        return false;
    }
public function update(array $data)
    {
        try
        {
            if ( $this->validator->with($data)->validForUpdate() )
            {
                $this->users->update($data['id'], $this->validator->getData());
                return true;
            }
        }
        catch (LoginRequiredException $e)
        {
            $this->validator->add('LoginRequiredException',$e->getMessage());
        }
        catch (PasswordRequiredException $e)
        {
            $this->validator->add('PasswordRequiredException',$e->getMessage());
        }
        catch (UserExistsException $e)
        {
            $this->validator->add('UserExistsException',$e->getMessage());
        }

        return false;
    }
public function update ( array $ data ) { try { if ( $ this -> validator -> with ( $ data ) -> validForUpdate ( ) ) { $ this -> users -> update ( $ data [ 'id' ] , $ this -> validator -> getData ( ) ) ; return true ; } } catch ( LoginRequiredException $ e ) { $ this -> validator -> add ( 'LoginRequiredException' , $ e -> getMessage ( ) ) ; } catch ( PasswordRequiredException $ e ) { $ this -> validator -> add ( 'PasswordRequiredException' , $ e -> getMessage ( ) ) ; } catch ( UserExistsException $ e ) { $ this -> validator -> add ( 'UserExistsException' , $ e -> getMessage ( ) ) ; } return false ; }
Validate and update a existing user

@author Steve Montambeault
@link   http://stevemo.ca

@param array $data

@return bool
Validate and update a existing user