private static function activated(array $data, $user)
    {
        $input = array_keys($data);

        $field = $input[0];
        $value = $data[$field];

        if ($user->$field != $value) {
            return false;
        }

        return true;
    }
private static function activated(array $data, $user)
    {
        $input = array_keys($data);

        $field = $input[0];
        $value = $data[$field];

        if ($user->$field != $value) {
            return false;
        }

        return true;
    }
private static function activated ( array $ data , $ user ) { $ input = array_keys ( $ data ) ; $ field = $ input [ 0 ] ; $ value = $ data [ $ field ] ; if ( $ user -> $ field != $ value ) { return false ; } return true ; }
Check if user account is activated.

@param array $data
@param $user

@return bool
Check if user account is activated .