After logging in, when the administrator looks at the member list they’ll find that the email verification part only works if the customer verifies it themselves, but most customers are unwilling to go and verify, so let’s change it so the administrator can do it. During email verification the customer’s verification status of 0 or 1 is used to decide whether to show the correct or the incorrect image, and it also occurred to me that in the product list there is put on sale, take off sale, whether it’s a new item… so I can just copy that code over as a reference. From the product list I learned that it’s js that validates and transmits the data, so I went straight to the js file and printed something out of it to see the path. Then, following the path, change the data in the member file. Product list code1
2
3
4
5elseif ($\_REQUEST\['act'\] == 'toggle\_on\_sale') {
check\_authz\_json('goods\_manage');
$goods\_id = intval($\_POST\['id'\]);
$on\_sale = intval($\_POST\['val'\]);
if ($exc->edit("is\_on\_sale = '$on\_sale', last\_update=" .gmtime(), $goods\_id)) { clear\_cache\_files(); make\_json\_result($on\_sale); } }
Write the code based on this, copy it into the member file, and make the changes. After the change1
2
3
4
5
6
7
8elseif ($\_REQUEST\['act'\] == 'toggle\_validated') {
$user\_id = intval($\_REQUEST\['id'\]);
$is\_validated = intval($\_REQUEST\['val'\]);
$exc = new exchange($ecs->table('users'), $db, 'user\_id', 'user\_name');
if ($exc->edit("is\_validated = '$is\_validated'", $user\_id)) {
clear\_cache\_files(); make\_json\_result(stripslashes($is\_validated));
}
}
Also note that the htm file needs changing too; just follow the example in the product table.

