If everything is set properly, and the emails exists in the database,
and is associated with a correct user, and this user has the status
NOTACTIVE and the given activationKey is identical to the one in the
database then generate a new Activation key to avoid double activation,
set the status to ACTIVATED and save the data
Error Codes:
-1 : User is not inactive, it can not be activated
-2 : Wrong activation key
-3 : Profile found, but no user - database inconsistency?
public static activate ( $email, $key ) |