public function checkProfileEditPermission($user_id) {
    $current_user_id = App::make('sentry')->getUser()->id;

    // edit his profile
    if ($user_id == $current_user_id) {
      return true;
    }
    // has special permission to edit other user profiles
    $edit_perm = Config::get('authentication::permissions.edit_profile');
    if ($this->hasPermission($edit_perm)) {
      return true;
    }

    return false;
  }
public function checkProfileEditPermission($user_id) {
    $current_user_id = App::make('sentry')->getUser()->id;

    // edit his profile
    if ($user_id == $current_user_id) {
      return true;
    }
    // has special permission to edit other user profiles
    $edit_perm = Config::get('authentication::permissions.edit_profile');
    if ($this->hasPermission($edit_perm)) {
      return true;
    }

    return false;
  }
public function checkProfileEditPermission ( $ user_id ) { $ current_user_id = App :: make ( 'sentry' ) -> getUser ( ) -> id ; // edit his profile if ( $ user_id == $ current_user_id ) { return true ; } // has special permission to edit other user profiles $ edit_perm = Config :: get ( 'authentication::permissions.edit_profile' ) ; if ( $ this -> hasPermission ( $ edit_perm ) ) { return true ; } return false ; }
Check if the current user has permission to edit the profile

@return boolean
Check if the current user has permission to edit the profile