summaryrefslogtreecommitdiffstats
path: root/modules-available/remoteaccess/hooks/client-update.inc.php
blob: 579eb25c9489a3b1ffd540da4f05bd6e5fe79229 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
<?php

if ($type === '~poweron') {
	Database::exec("UPDATE remoteaccess_machine SET password = NULL, wolfails = 0
			WHERE machineuuid = :uuid",
		['uuid' => $uuid]);
} elseif ($type === '~poweroff') {
	Database::exec("UPDATE remoteaccess_machine SET woltime = 0 WHERE machineuuid = :uuid",
		['uuid' => $uuid]);
}