1*3f4d1534SAndreas Gohr<?php 2*3f4d1534SAndreas Gohr/** 3*3f4d1534SAndreas Gohr * Basic Wordpress config 4*3f4d1534SAndreas Gohr * 5*3f4d1534SAndreas Gohr * Wordpress has no proper groups. This configures the default access permissions as groups. Better group 6*3f4d1534SAndreas Gohr * support is available through a Wrdpress plugin 7*3f4d1534SAndreas Gohr */ 8*3f4d1534SAndreas Gohr/** @noinspection SqlResolve */ 9*3f4d1534SAndreas Gohr$data = array( 10*3f4d1534SAndreas Gohr 'passcrypt' => 'pmd5', 11*3f4d1534SAndreas Gohr 'conf' => array( 12*3f4d1534SAndreas Gohr 'select-user' => ' 13*3f4d1534SAndreas Gohr SELECT ID AS uid, 14*3f4d1534SAndreas Gohr user_login AS user, 15*3f4d1534SAndreas Gohr display_name AS name, 16*3f4d1534SAndreas Gohr user_pass AS hash, 17*3f4d1534SAndreas Gohr user_email AS mail 18*3f4d1534SAndreas Gohr FROM wpvk_users 19*3f4d1534SAndreas Gohr WHERE user_login = :user 20*3f4d1534SAndreas Gohr ', 21*3f4d1534SAndreas Gohr 'select-user-groups' => ' 22*3f4d1534SAndreas Gohr SELECT CONCAT("group",meta_value) as `group` 23*3f4d1534SAndreas Gohr FROM wpvk_usermeta 24*3f4d1534SAndreas Gohr WHERE user_id = :uid 25*3f4d1534SAndreas Gohr AND meta_key = "wpvk_user_level" 26*3f4d1534SAndreas Gohr ', 27*3f4d1534SAndreas Gohr 'select-groups' => '', 28*3f4d1534SAndreas Gohr 'insert-user' => '', 29*3f4d1534SAndreas Gohr 'delete-user' => '', 30*3f4d1534SAndreas Gohr 'list-users' => '', 31*3f4d1534SAndreas Gohr 'count-users' => '', 32*3f4d1534SAndreas Gohr 'update-user-info' => ' 33*3f4d1534SAndreas Gohr UPDATE wpvk_users 34*3f4d1534SAndreas Gohr SET display_name = :name, 35*3f4d1534SAndreas Gohr user_email = :mail 36*3f4d1534SAndreas Gohr WHERE ID = :uid 37*3f4d1534SAndreas Gohr ', 38*3f4d1534SAndreas Gohr 'update-user-login' => ' 39*3f4d1534SAndreas Gohr UPDATE wpvk_users 40*3f4d1534SAndreas Gohr SET user_login = :newlogin 41*3f4d1534SAndreas Gohr WHERE ID = :uid 42*3f4d1534SAndreas Gohr ', 43*3f4d1534SAndreas Gohr 'update-user-pass' => ' 44*3f4d1534SAndreas Gohr UPDATE wpvk_users 45*3f4d1534SAndreas Gohr SET user_pass = :hash 46*3f4d1534SAndreas Gohr WHERE ID = :uid 47*3f4d1534SAndreas Gohr ', 48*3f4d1534SAndreas Gohr 'insert-group' => '', 49*3f4d1534SAndreas Gohr 'join-group' => '', 50*3f4d1534SAndreas Gohr 'leave-group' => '', 51*3f4d1534SAndreas Gohr ), 52*3f4d1534SAndreas Gohr 'users' => array( 53*3f4d1534SAndreas Gohr array( 54*3f4d1534SAndreas Gohr 'user' => 'admin', 55*3f4d1534SAndreas Gohr 'pass' => 'pass', 56*3f4d1534SAndreas Gohr 'name' => 'admin', 57*3f4d1534SAndreas Gohr 'mail' => 'admin@example.com', 58*3f4d1534SAndreas Gohr 'grps' => 59*3f4d1534SAndreas Gohr array( 60*3f4d1534SAndreas Gohr 0 => 'group10', 61*3f4d1534SAndreas Gohr ), 62*3f4d1534SAndreas Gohr ), 63*3f4d1534SAndreas Gohr array( 64*3f4d1534SAndreas Gohr 'user' => 'test1', 65*3f4d1534SAndreas Gohr 'pass' => 'pass', 66*3f4d1534SAndreas Gohr 'name' => 'Test1 Subscriber', 67*3f4d1534SAndreas Gohr 'mail' => 'test1@example.com', 68*3f4d1534SAndreas Gohr 'grps' => 69*3f4d1534SAndreas Gohr array( 70*3f4d1534SAndreas Gohr 0 => 'group0', 71*3f4d1534SAndreas Gohr ), 72*3f4d1534SAndreas Gohr ), 73*3f4d1534SAndreas Gohr array( 74*3f4d1534SAndreas Gohr 'user' => 'test2', 75*3f4d1534SAndreas Gohr 'pass' => 'pass', 76*3f4d1534SAndreas Gohr 'name' => 'Test2 Contributor', 77*3f4d1534SAndreas Gohr 'mail' => 'test2@example.com', 78*3f4d1534SAndreas Gohr 'grps' => 79*3f4d1534SAndreas Gohr array( 80*3f4d1534SAndreas Gohr 0 => 'group1', 81*3f4d1534SAndreas Gohr ), 82*3f4d1534SAndreas Gohr ), 83*3f4d1534SAndreas Gohr array( 84*3f4d1534SAndreas Gohr 'user' => 'test3', 85*3f4d1534SAndreas Gohr 'pass' => 'pass', 86*3f4d1534SAndreas Gohr 'name' => 'Test3 Author', 87*3f4d1534SAndreas Gohr 'mail' => 'test3@example.com', 88*3f4d1534SAndreas Gohr 'grps' => 89*3f4d1534SAndreas Gohr array( 90*3f4d1534SAndreas Gohr 0 => 'group2', 91*3f4d1534SAndreas Gohr ), 92*3f4d1534SAndreas Gohr ), 93*3f4d1534SAndreas Gohr ), 94*3f4d1534SAndreas Gohr); 95