Adding a role using Members and Formidable Forms

Not a coder 🙁 Been using a snippet to change roles when someone completes a Formidable Forms. Works fine. But on another site, I want to just ‘add’ a role. I don’t know how to modify the snippet below to add a given role rather than changing it. Thoughts?

/** * This will change a user to a different member role after they complete their member profile. */ add_action('frm_after_create_entry', 'inactive_to_member', 20, 2); function inactive_to_member($  entry_id, $  form_id){  if($  form_id == 21){ // form id of the form to copy    $  new_role = 'census_club'; //change this to the role users should be granted upon completing form     $  user = wp_get_current_user(); //get logged in user    if(!$  user) {        return; //don't continue if user doesn't exist    }     $  updated_user = (array)$  user;     // Get the highest/primary role for this user      $  user_roles = $  user->roles;    $  user_role = array_shift($  user_roles);    if ( $  user_role == 'administrator' )         return; //make sure we don't downgrade any admins     $  updated_user['role'] = $  new_role;         wp_update_user($  updated_user);  } }``` 

Explicitly revoke privileges from a user who is a member of a role that is granted those privileges in PostgreSQL

Let’s say I have a user on my PostgreSQL instance called "myuser", and I add it to a new group called "update_all" like this:


I then grant the update_all role permission to update every table in every schema in every database. My thinking is that I can revoke update permissions from all users by default, and just grant this role to any user that I want to let update tables. However, say I decide that I want myuser to be able to update tables in every database except "mydb". Is there a way to explicitly revoke privileges that are granted to a user by a role it is a member of without removing it from that role? I would also be interested to know whether this is possible at the schema level. The closest thing I’ve found is row-level security policies, but it seems like they aren’t a perfect solution because you’d have to apply the same policy to every table in the database or schema one by one. It seems like there should be a way to explicitly deny even privileges that are inherited. Is anything like this possible?


The ceramic anilox roller is often referred to as the heart of the flexographic press. It is designed to deliver a precise and consistent amount of ink to the printing plate. 
An anilox roll is a hard cylinder, usually constructed of a steel or aluminum core which is coated by an industrial ceramic whose surface contains millions of very fine dimples, known as cells. The choice of the correct anilox roller is of central importance for an optimal printing result. Depending on the printing type, we recommend different engravings and cell volumes. The choice of the correct anilox roller is of central importance for an optimal printing result.
A flexographic printer often faces problems due to the nonavailability of the correct anilox roller. The purpose of this article is to make an attempt to throw some light on this very important subject.

Anilox roll:
The flexo printing/coating process depends upon the precise controlled transfer of a liquid ink, varnish or coating. An anilox roll is simply a metering roll designed to consistently supply a uniform and measurable volume of ink onto the image carrier.Anilox roll is considered to be the heart of the flexographic press. Older methods of mechanically engraving cells in to the surface of a roll have been replaced, to a large extent, by the precise computer controlled laser engravings of ceramic coated steel rolls. In this process, millions of minute holes (cells) are drilled into the ceramic surface of the roll. Ink receptivity and releasing capabilities of the anilox roll is of higher importance and ink transfer capabilities of the plate are determined by the surface technology of plate, surface tension of plate & ink and plate to ink compatibility.
The central part of the press is the anilox roller, the ink metering system unique to this process that allows the correct amount of ink to be carried to the printing plate. On the surface of the anilox roll are etched the cells which act as ink carriers.
The latest chrome anilox roller is laser engraved, with cell counts currently up to 500 cells/cm, from a steel roller and coated in fine ceramic. These laser engraved ceramic rolls could last up to 10 years, depending on the wear they are exposed to from contact with the doctor’s blade. They provide an even, and consistent ink delivery in a controlled manner and provide narrow web flexo with a competitive edge in the leading packaging markets eg self-adhesive labels for wines. Once the anilox is ‘charged’ with ink, the excess is wiped off with a flexible steel doctor blade.
Besides the cell geometry, ink release capabilities of the cell are also affected by rheological properties of ink like; viscosity, surface tension, printing pressure between the plate cylinder and the impression cylinder, substrate properties, etc.

Anilox engraving angles:
Available engraving angles for anilox rolls are as follows; 90 degree angle, 45 degree angle, 30 degree angle and 60 degree angle.
In 60 degree anilox angle, the hexagonal cell offers 15 per cent more cells on the same area. Higher quantity of cells indicates a plus point concerning the ink transfer, as well as homogeneity.

Anilox sleeves:
Some of today’s servo driven narrow web presses make use of anilox sleeves, which are much lighter than the standard solid anilox. The advantage is ease of handling and loading. On the narrow web side there is no difference in performance than with a conventional roll. Ceramic anilox sleeves initially were profiled in a scenario of short-run environments where anilox changes are very common and required, but have shown their usefulness regardless of the frequency of changeover. Sleeves are easier to store and inventory.
The disadvantages of sleeves are their cost as well as the different care and handling that is required. Converters need to design special racks to store sleeves so that the chance of damage is minimized. In addition, sleeves cannot be cleaned in the same fashion as rolls, which may add more time and cost.

Mirror rollers are generally used in plastics, packaging, printing, steel and other industries. Since traditional hard chrome electroplating cannot fully meet the requirements of wear resistance and corrosion resistance, our matting rollers can perfectly solve these problems. Its hardness is increased from HRV800 with hard chrome layer to HRV1200, the corrosion resistance is greatly improved, and the service life is long.

Dr blade materials, on the other hand, are a little more complicated of a subject than that of their shape. There are five materials commonly used to create blades today and they are as follows: plastic (UHMW/UHMWPE), stainless steel, carbon steel, tool steel and graphite. While the steel blades have upsides and are favored by many within the industry, current trends and advancements in technology are heating up the playing field for plastic and graphite.

Postgres Role access privileges

I am trying to assign select privs via a role for current and future tables, and i cant see to figure this out. Please advise.

create role dev_role; grant usage on schema address to dev_role grant select on all tables in schema address to dev_role  alter default privileges in schema address grant select on tables to dev_role;   grant dev_role to test1; 

Now, Test2 user creates a table in address schema that has grant all privileges.

\c dev test2 create table address.t1(t integer);  \c dev test1 select * from address_match.t1; ERROR:  permission denied for table t1 

Role added by plugin remains even after deactivating plugins

I deactivated a theme and its plugins which adds a lot of roles, but the roles are still there. I then deactivated all plugins and changed the theme to the 2021 wordpress theme. The roles still won’t go. I am aware that there are some plugins that can help you restore the default roles or even directly edit them. My questions is, isn’t it a design flaw that you can’t completely wipe out what a plugin does by deactivating them?

WP_User_Query combining role and ids

I would like to get array of all authors (except few), add several admins to it (by ids) and order the array by user names. But I can’t find the way how to make it in one WP_User_Query.

When I called those two subqueries separately and put the results together by array_merge(), it was ok, but I need to order them by name, which was not possible in that way…

So right now I am trying something like this, but it gets me all the users. What I am doing wrong?

$  args = array(     'orderby'  => 'display_name',     'order'    => 'ASC',     array(         'relation' => 'OR',         array(             'role' =>   'author',             'exclude' => array(36, 41)         ),         array(             'include' => array(23, 45),         )     ) ); 

Pre-Fix Order Numbers by User Role

I currently have orders set with the pre-fix "W" for Wholesale orders to differentiate them from Retail orders. However, we have a few different wholesale roles and I would like to be able to differentiate those orders with a pre-fix as well. Is there a way to code a special pre-fix based on user role? The role in particular would be for a wholesale role labeled as employee. Since Employee falls under the Wholesale Role, it is getting the W prefix to their orders. I would like all other wholesale orders to have the W prefix, Employee orders to have an E prefix, and all retail orders to have no prefix (remain as-is).

Here is the snippet that works for wholesale orders to have the W prefix:

add_filter( 'woocommerce_order_number', 'change_woocommerce_order_number' ); function change_woocommerce_order_number( $  order_id ) {       $  prefix = 'W'; //The Prefix      $  order_type = get_post_meta( $  order_id, '_wwpp_order_type',true); //get Wholesale Order Type           if ($  order_type == 'wholesale') {         $  new_order_id = $  prefix . $  order_id;         return $  new_order_id;     }           return $  order_id; } 

How to allow certain role to view Customer list

I have custom user role called Salesman. Whenever a Customer create order, a salesman was assigned to that Customer.

I need to allow user role Salesman to access WooCommerce -> Customer page.

I’ve search all available capabilities using User Role Editor plugin but none about list customer. list_users display User list page, but not the WooCommerce -> Customer page.