264
seCure develoPment For mobIle APPs
It takes an activation key, which is unique, and asks the global database to look it up
and mark the account as active. If successful, an email is sent, a temp variable is cre-
ated for use in the activation complete page, and a redirection is made to activation-
complete.php with an exit.
global $db;
global $sm;
$record = $db->activateAccount($activationKey);
is database call performs two steps with PDO prepared statements. It checks for
a valid code, and if so marks the account records as active. e pending table holds the
email address along with the code, so when the code is returned, the associated email
address is used to lookup the account for updating.
Here are the four MobileSecData functions ...