{"id":1577,"date":"2022-08-30T15:17:41","date_gmt":"2022-08-30T15:17:41","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/27\/how-to-delete-all-user-roles-in-kohana-3-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:17:41","modified_gmt":"2022-08-30T15:17:41","slug":"how-to-delete-all-user-roles-in-kohana-3-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/how-to-delete-all-user-roles-in-kohana-3-collection-of-common-programming-errors\/","title":{"rendered":"How to delete all user roles in Kohana 3-Collection of common programming errors"},"content":{"rendered":"<p>According to version 3.1.3.1 code for Kohana_ORM class, the ORM method &#8220;remove($alias, $far_keys=NULL)&#8221; if you do not pass the second parameter, it will destroy all related entries.<\/p>\n<pre><code>$user-&gt;remove('roles');\n<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2013-11-27 11:53:11. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>According to version 3.1.3.1 code for Kohana_ORM class, the ORM method &#8220;remove($alias, $far_keys=NULL)&#8221; if you do not pass the second parameter, it will destroy all related entries. $user-&gt;remove(&#8216;roles&#8217;); Originally posted 2013-11-27 11:53:11.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1577","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1577","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1577"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1577\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}