Mark the session up to indicate that the username supplied has successfully logged in. Although normally used for internal purposes this function can be used to fake a login.
This function can not be called statically.
This function will also call session_regenerate_id() so as to prevent session fixation attacks.