Hello,
When editing the subscriber table using phpmyadmin, updating the ha1 fields are no fun and
error prone. The trigger below will calculate the hashes if the input fields are left
empty. Navigate to the subscriber table in phpmyadmin and drop the code in the query field
under the "SQL" tab. Remeber to set the delimiter to //
/Ole
DROP TRIGGER IF EXISTS calcha1 //
CREATE TRIGGER calcha1 BEFORE INSERT ON subscriber
FOR EACH ROW
BEGIN
IF NEW.ha1 = "" THEN SET NEW.ha1 =
MD5(CONCAT(NEW.username,":",NEW.domain,":",NEW.password));
END IF;
IF NEW.ha1b = "" THEN SET NEW.ha1b =
MD5(CONCAT(NEW.username,"@",NEW.domain,":",NEW.domain,":",NEW.password));
END IF;
END//